When cart clear is declined, revert order cycle selection change

This commit is contained in:
Rohan Mitchell
2015-07-31 11:35:29 +10:00
parent b97bbae00e
commit faa1d0d1c5
4 changed files with 62 additions and 28 deletions

View File

@@ -1,19 +1,17 @@
describe 'OrderCycleCtrl', ->
ctrl = null
scope = null
event = null
product_ctrl = null
OrderCycle = null
beforeEach ->
module 'Darkswarm'
scope = {}
OrderCycle =
order_cycle: "test"
OrderCycle =
order_cycle:
id: 123
inject ($controller) ->
scope = {}
ctrl = $controller 'OrderCycleCtrl', {$scope: scope, OrderCycle: OrderCycle}
it "puts the order cycle in scope", ->
expect(scope.order_cycle).toEqual "test"
expect(scope.order_cycle).toEqual {id: 123}