#6276 createNewWarehouse methods migrated from silex to salix #1850
|
@ -59,24 +59,4 @@ describe('collection getSalesFromTicketOrCollection()', () => {
|
|||
throw e;
|
||||
}
|
||||
});
|
||||
|
||||
it('should getSalesFromTicketOrCollection', async() => {
|
||||
const tx = await models.Collection.beginTransaction({});
|
||||
|
||||
try {
|
||||
const options = {transaction: tx};
|
||||
await models.Ticket.updateAll({id: collectionOrTicketFk}, {shipped: '2001-01-02 00:00:00.000'}, options);
|
||||
|
||||
const ticketTrackingBefore = await models.TicketTracking.find(null, options);
|
||||
await models.Collection.getSalesFromTicketOrCollection(ctx,
|
||||
collectionOrTicketFk, false, 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