2022-11-23 14:15:40 +00:00
|
|
|
const models = require('vn-loopback/server/server').models;
|
|
|
|
|
2022-11-25 10:50:54 +00:00
|
|
|
describe('ticketLog getChanges()', () => {
|
2022-11-30 12:43:29 +00:00
|
|
|
const ctx = {req: {}};
|
|
|
|
|
|
|
|
ctx.req.__ = value => {
|
|
|
|
return value;
|
|
|
|
};
|
2022-11-25 10:50:54 +00:00
|
|
|
it('should return the changes in the sales of a ticket', async() => {
|
2023-06-09 06:06:45 +00:00
|
|
|
const ticketId = 16;
|
2022-11-23 14:15:40 +00:00
|
|
|
|
2022-11-30 12:43:29 +00:00
|
|
|
const changues = await models.TicketLog.getChanges(ctx, ticketId);
|
2022-11-23 14:15:40 +00:00
|
|
|
|
2022-11-30 12:43:29 +00:00
|
|
|
expect(changues).toContain(`Change quantity`);
|
2022-11-23 14:15:40 +00:00
|
|
|
});
|
|
|
|
});
|