4804-ticket.descriptor_sms #1217

Merged
vicent merged 12 commits from 4804-ticket.descriptor_sms into dev 2022-12-21 11:30:02 +00:00
1 changed files with 8 additions and 3 deletions
Showing only changes of commit c1089c637a - Show all commits

View File

@ -1,11 +1,16 @@
const models = require('vn-loopback/server/server').models;
describe('ticketLog getChanges()', () => {
const ctx = {req: {}};
ctx.req.__ = value => {
return value;
};
it('should return the changes in the sales of a ticket', async() => {
const ticketId = 1;
const ticketId = 7;
const changues = await models.TicketLog.getChanges({id: ticketId});
const changues = await models.TicketLog.getChanges(ctx, ticketId);
expect(changues).toContain(`cambia de 1 a 10`);
expect(changues).toContain(`Change quantity`);
});
});