6822-entryTransfer #3376
|
@ -23,6 +23,8 @@ describe('Transfer merchandise from one entry to the next day()', () => {
|
|||
|
||||
const newEntrybuys = await models.Buy.find({where: {entryFk: result[0].newEntryFk}}, options);
|
||||
|
||||
const newTravel = await models.Entry.find({where: {id: result[0].newEntryFk}}, options);
|
||||
|
||||
const itemShelvingsWithBuys = await models.Buy.find({
|
||||
include: {
|
||||
relation: 'itemShelving',
|
||||
|
@ -37,6 +39,9 @@ describe('Transfer merchandise from one entry to the next day()', () => {
|
|||
|
||||
expect(newEntrybuys.length).toEqual(originalEntrybuys.length - hasItemShelving.length);
|
||||
|
||||
await models.Travel.destroyById(newTravel, options);
|
||||
await models.Entry.destroyById(result[0].newEntryFk, options);
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
await tx.rollback();
|
||||
|
|
Loading…
Reference in New Issue