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:
luisramos0
2019-11-11 13:26:26 +00:00
parent 24d7672abb
commit 2b3bc6d1ff
6 changed files with 12 additions and 88 deletions

View File

@@ -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')