Order cycle simple create controller uses 'new' method on OC service to initialise

This commit is contained in:
Rob Harrington
2015-03-27 11:29:02 +11:00
parent 4d14acb64d
commit aa170ef5f6
2 changed files with 9 additions and 4 deletions

View File

@@ -9,14 +9,18 @@ describe "AdminSimpleCreateOrderCycleCtrl", ->
beforeEach ->
scope = {}
order_cycle =
coordinator_id: 123
incoming_exchanges: [incoming_exchange]
outgoing_exchanges: [outgoing_exchange]
OrderCycle =
order_cycle:
incoming_exchanges: [incoming_exchange]
outgoing_exchanges: [outgoing_exchange]
order_cycle: order_cycle
addSupplier: jasmine.createSpy()
addDistributor: jasmine.createSpy()
setExchangeVariants: jasmine.createSpy()
new: jasmine.createSpy().andReturn order_cycle
Enterprise =
get: jasmine.createSpy().andReturn {id: 123}
index: jasmine.createSpy()
suppliedVariants: jasmine.createSpy().andReturn('supplied variants')
EnterpriseFee =