fix: backTest
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2022-11-30 13:43:29 +01:00
parent 1588492f9a
commit c1089c637a
1 changed files with 8 additions and 3 deletions

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`);
});
});