Use new exchange products endpoint for outgoing exchanges and make the exchange products panel work for outgoing exchanges

This commit is contained in:
luisramos0
2019-11-14 19:26:11 +00:00
parent 89628c27f3
commit 24d7672abb
6 changed files with 3 additions and 57 deletions

View File

@@ -14,7 +14,6 @@ describe 'AdminOrderCycleOutgoingCtrl', ->
absUrl: ->
'example.com/admin/order_cycles/27/edit'
OrderCycle =
productSuppliedToOrderCycle: jasmine.createSpy('productSuppliedToOrderCycle').and.returnValue('product supplied')
variantSuppliedToOrderCycle: jasmine.createSpy('variantSuppliedToOrderCycle').and.returnValue('variant supplied')
ocInstance = {}
@@ -22,10 +21,6 @@ describe 'AdminOrderCycleOutgoingCtrl', ->
inject ($controller) ->
ctrl = $controller 'AdminOrderCycleOutgoingCtrl', {$scope: scope, $location: location, OrderCycle: OrderCycle, Enterprise: Enterprise, EnterpriseFee: EnterpriseFee, ocInstance: ocInstance}
it 'Delegates productSuppliedToOrderCycle to OrderCycle', ->
expect(scope.productSuppliedToOrderCycle('product')).toEqual('product supplied')
expect(OrderCycle.productSuppliedToOrderCycle).toHaveBeenCalledWith('product')
it 'Delegates variantSuppliedToOrderCycle to OrderCycle', ->
expect(scope.variantSuppliedToOrderCycle('variant')).toEqual('variant supplied')
expect(OrderCycle.variantSuppliedToOrderCycle).toHaveBeenCalledWith('variant')