From 6da84e46c190db3b1d9061bc7fb31df96675e01e Mon Sep 17 00:00:00 2001 From: joan Date: Mon, 22 Mar 2021 10:20:04 +0100 Subject: [PATCH] Added throw error --- .../methods/claim-beginning/importToNewRefundTicket.spec.js | 1 + modules/entry/back/methods/entry/specs/importBuys.spec.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/claim/back/methods/claim-beginning/importToNewRefundTicket.spec.js b/modules/claim/back/methods/claim-beginning/importToNewRefundTicket.spec.js index 1e98bf634..b05b2ac15 100644 --- a/modules/claim/back/methods/claim-beginning/importToNewRefundTicket.spec.js +++ b/modules/claim/back/methods/claim-beginning/importToNewRefundTicket.spec.js @@ -36,6 +36,7 @@ describe('claimBeginning', () => { await tx.rollback(); } catch (e) { await tx.rollback(); + throw e; } }); }); diff --git a/modules/entry/back/methods/entry/specs/importBuys.spec.js b/modules/entry/back/methods/entry/specs/importBuys.spec.js index dbe5ce201..b0a55e3a1 100644 --- a/modules/entry/back/methods/entry/specs/importBuys.spec.js +++ b/modules/entry/back/methods/entry/specs/importBuys.spec.js @@ -1,7 +1,7 @@ const app = require('vn-loopback/server/server'); const LoopBackContext = require('loopback-context'); -describe('entry import()', () => { +fdescribe('entry import()', () => { const buyerId = 35; const companyId = 442; const travelId = 1; @@ -64,7 +64,7 @@ describe('entry import()', () => { await app.models.Entry.importBuys(ctx, newEntry.id, options); - const updatedEntry = await app.models.Entry.findById(newEntry.id, null, options); + const updatedEntry = await app.models.Entry.findById(null, null, options); const entryBuys = await app.models.Buy.find({ where: {entryFk: newEntry.id} }, options); @@ -76,6 +76,7 @@ describe('entry import()', () => { await tx.rollback(); } catch (e) { await tx.rollback(); + throw e; } }); });