salix/modules/ticket/back/methods/ticket-log/specs/getChanges.spec.js

17 lines
436 B
JavaScript
Raw Normal View History

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-30 12:43:29 +00:00
const changues = await models.TicketLog.getChanges(ctx, ticketId);
2022-11-30 12:43:29 +00:00
expect(changues).toContain(`Change quantity`);
});
});