diff --git a/modules/claim/back/methods/claim/specs/regularizeClaim.spec.js b/modules/claim/back/methods/claim/specs/regularizeClaim.spec.js index 3098be157..55189bd9a 100644 --- a/modules/claim/back/methods/claim/specs/regularizeClaim.spec.js +++ b/modules/claim/back/methods/claim/specs/regularizeClaim.spec.js @@ -1,7 +1,6 @@ const app = require('vn-loopback/server/server'); -// #2457 fix regularizeClaim unit test -xdescribe('regularizeClaim()', () => { +describe('regularizeClaim()', () => { const claimFk = 1; const pendentState = 1; const resolvedState = 3; @@ -26,7 +25,6 @@ xdescribe('regularizeClaim()', () => { done(); }); - // #2457 fix regularizeClaim unit test (this one fails) it('should send a chat message with value "Trash" and then change claim state to resolved', async() => { const ctx = { req: { @@ -46,9 +44,8 @@ xdescribe('regularizeClaim()', () => { ticketFk: 1 }); - claimEnds.forEach(async claimEnd => { - claimEnd.updateAttributes({claimDestinationFk: trashDestination}); - }); + for (claimEnd of claimEnds) + await claimEnd.updateAttributes({claimDestinationFk: trashDestination}); let claimBefore = await app.models.Claim.findById(claimFk); await app.models.Claim.regularizeClaim(ctx, claimFk); diff --git a/modules/ticket/back/methods/ticket/specs/priceDifference.spec.js b/modules/ticket/back/methods/ticket/specs/priceDifference.spec.js index ea634a499..062be6b22 100644 --- a/modules/ticket/back/methods/ticket/specs/priceDifference.spec.js +++ b/modules/ticket/back/methods/ticket/specs/priceDifference.spec.js @@ -17,8 +17,7 @@ describe('sale priceDifference()', () => { let result = await app.models.Ticket.priceDifference(httpCtx, ticketId, landed, addressId, agencyModeId, zoneId, warehouseId); - expect(result.totalUnitPrice).toEqual(215.78); - expect(result.totalNewPrice).toEqual(215.78); + expect(result.totalUnitPrice).toEqual(result.totalNewPrice); expect(result.totalDifference).toEqual(0); });