Reworking our bindings so everything stacks on objects and automagically updates

This commit is contained in:
Will Marshall
2013-12-11 15:39:50 +11:00
parent bc4f472523
commit 8f41078c0c
3 changed files with 5 additions and 5 deletions

View File

@@ -18,7 +18,8 @@ describe 'OrderCycle service', ->
it "posts the order_cycle ID and tells product to update", ->
$httpBackend.expectPOST("/shop/order_cycle", {"order_cycle_id" : 10}).respond(200)
spyOn(mockProduct, "update")
OrderCycle.set_order_cycle(10)
OrderCycle.order_cycle.order_cycle_id = 10
OrderCycle.push_order_cycle()
$httpBackend.flush()
expect(mockProduct.update).toHaveBeenCalled()