mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-19 04:49:15 +00:00
Remove funky panel open listener code and initialize the panel data with a ng-init in the panel template
This commit is contained in:
@@ -11,7 +11,6 @@ describe 'AdminEditOrderCycleCtrl', ->
|
||||
scope =
|
||||
order_cycle_form: jasmine.createSpyObj('order_cycle_form', ['$dirty', '$setPristine'])
|
||||
$watch: jasmine.createSpy('$watch')
|
||||
exchangeListChanged: jasmine.createSpy('exchangeListChanged')
|
||||
event =
|
||||
preventDefault: jasmine.createSpy('preventDefault')
|
||||
location =
|
||||
|
||||
@@ -10,7 +10,6 @@ describe 'AdminOrderCycleIncomingCtrl', ->
|
||||
beforeEach ->
|
||||
scope =
|
||||
$watch: jasmine.createSpy('$watch')
|
||||
exchangeListChanged: jasmine.createSpy('exchangeListChanged')
|
||||
location =
|
||||
absUrl: ->
|
||||
'example.com/admin/order_cycles/27/edit'
|
||||
@@ -45,4 +44,4 @@ describe 'AdminOrderCycleIncomingCtrl', ->
|
||||
scope.addSupplier(event)
|
||||
|
||||
expect(event.preventDefault).toHaveBeenCalled()
|
||||
expect(OrderCycle.addSupplier).toHaveBeenCalledWith('new supplier id', scope.exchangeListChanged)
|
||||
expect(OrderCycle.addSupplier).toHaveBeenCalledWith('new supplier id')
|
||||
|
||||
@@ -10,7 +10,6 @@ describe 'AdminOrderCycleOutgoingCtrl', ->
|
||||
beforeEach ->
|
||||
scope =
|
||||
$watch: jasmine.createSpy('$watch')
|
||||
exchangeListChanged: jasmine.createSpy('exchangeListChanged')
|
||||
location =
|
||||
absUrl: ->
|
||||
'example.com/admin/order_cycles/27/edit'
|
||||
@@ -35,4 +34,4 @@ describe 'AdminOrderCycleOutgoingCtrl', ->
|
||||
scope.addDistributor(event)
|
||||
|
||||
expect(event.preventDefault).toHaveBeenCalled()
|
||||
expect(OrderCycle.addDistributor).toHaveBeenCalledWith('new distributor id', scope.exchangeListChanged)
|
||||
expect(OrderCycle.addDistributor).toHaveBeenCalledWith('new distributor id')
|
||||
|
||||
Reference in New Issue
Block a user