From c1089c637ac8d4730c7eb53c90fc831b567a0642 Mon Sep 17 00:00:00 2001 From: vicent Date: Wed, 30 Nov 2022 13:43:29 +0100 Subject: [PATCH] fix: backTest --- .../back/methods/ticket-log/specs/getChanges.spec.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/ticket/back/methods/ticket-log/specs/getChanges.spec.js b/modules/ticket/back/methods/ticket-log/specs/getChanges.spec.js index cdbebf9b3..c0f7dde0e 100644 --- a/modules/ticket/back/methods/ticket-log/specs/getChanges.spec.js +++ b/modules/ticket/back/methods/ticket-log/specs/getChanges.spec.js @@ -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`); }); });