7152-devToTest_2414 #2228
|
@ -56,23 +56,4 @@ describe('collection getSalesFromTicketOrCollection()', () => {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should add a ticketTracking', async() => {
|
|
||||||
const collectionOrTicketFk = 23;
|
|
||||||
|
|
||||||
const tx = await models.Collection.beginTransaction({});
|
|
||||||
const options = {transaction: tx};
|
|
||||||
try {
|
|
||||||
const ticketTrackingBefore = await models.TicketTracking.find(null, options);
|
|
||||||
await models.Collection.getSalesFromTicketOrCollection(ctx,
|
|
||||||
collectionOrTicketFk, print, source, options);
|
|
||||||
const ticketTrackingAfter = await models.TicketTracking.find(null, options);
|
|
||||||
|
|
||||||
expect(ticketTrackingAfter.length).toEqual(ticketTrackingBefore.length + 1);
|
|
||||||
await tx.rollback();
|
|
||||||
} catch (e) {
|
|
||||||
await tx.rollback();
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue