mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Remove supplied products from enterprise serializer and from UI side
This list of products s now loaded in a specific call to ExchangeProducts and for each specific exchange
This commit is contained in:
@@ -25,8 +25,7 @@ describe 'AdminOrderCycleExchangesCtrl', ->
|
||||
addExchangeFee: jasmine.createSpy('addExchangeFee')
|
||||
removeExchangeFee: jasmine.createSpy('removeExchangeFee')
|
||||
removeDistributionOfVariant: jasmine.createSpy('removeDistributionOfVariant')
|
||||
Enterprise =
|
||||
supplied_products: 'supplied products'
|
||||
Enterprise = {}
|
||||
EnterpriseFee =
|
||||
forEnterprise: jasmine.createSpy('forEnterprise').and.returnValue('enterprise fees for enterprise')
|
||||
ocInstance = {}
|
||||
@@ -35,9 +34,6 @@ describe 'AdminOrderCycleExchangesCtrl', ->
|
||||
inject ($controller) ->
|
||||
ctrl = $controller 'AdminOrderCycleExchangesCtrl', {$scope: scope, $location: location, OrderCycle: OrderCycle, Enterprise: Enterprise, EnterpriseFee: EnterpriseFee, ocInstance: ocInstance}
|
||||
|
||||
it 'Loads supplied products', ->
|
||||
expect(scope.supplied_products).toEqual('supplied products')
|
||||
|
||||
it 'Delegates exchangeSelectedVariants to OrderCycle', ->
|
||||
expect(scope.exchangeSelectedVariants('exchange')).toEqual('variants selected')
|
||||
expect(OrderCycle.exchangeSelectedVariants).toHaveBeenCalledWith('exchange')
|
||||
|
||||
Reference in New Issue
Block a user