diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/refund.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/refund.spec.js index e2d17841f..3d0ea6809 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/refund.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/refund.spec.js @@ -3,6 +3,7 @@ const LoopBackContext = require('loopback-context'); describe('InvoiceOut refund()', () => { const userId = 5; + const withWarehouse = true; const activeCtx = { accessToken: {userId: userId}, }; @@ -15,7 +16,7 @@ describe('InvoiceOut refund()', () => { const options = {transaction: tx}; try { - const result = await models.InvoiceOut.refund('T1111111', true, options); + const result = await models.InvoiceOut.refund('T1111111', withWarehouse, options); expect(result).toBeDefined(); diff --git a/modules/ticket/back/methods/sale/specs/refund.spec.js b/modules/ticket/back/methods/sale/specs/refund.spec.js index 9c0ec73cc..b870a36f7 100644 --- a/modules/ticket/back/methods/sale/specs/refund.spec.js +++ b/modules/ticket/back/methods/sale/specs/refund.spec.js @@ -6,8 +6,8 @@ describe('Sale refund()', () => { const activeCtx = { accessToken: {userId: userId}, }; - const servicesIds = [3]; + const withWarehouse = true; beforeEach(() => { spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({ @@ -22,7 +22,7 @@ describe('Sale refund()', () => { try { const options = {transaction: tx}; - const refundedTicket = await models.Sale.refund(salesIds, servicesIds, true, options); + const refundedTicket = await models.Sale.refund(salesIds, servicesIds, withWarehouse, options); expect(refundedTicket).toBeDefined(); @@ -40,7 +40,7 @@ describe('Sale refund()', () => { try { const options = {transaction: tx}; - const ticket = await models.Sale.refund(salesIds, servicesIds, true, options); + const ticket = await models.Sale.refund(salesIds, servicesIds, withWarehouse, options); const refundedTicket = await models.Ticket.findOne({ where: {