4804-ticket.descriptor_sms #1217
|
@ -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`);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue