From 8fedd7893883f356b4a0f873ec356ded9709bb7b Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 29 Nov 2024 12:47:24 +0100 Subject: [PATCH] fix: refs #7965 filter and sales back tests --- .../ticket/back/methods/ticket/specs/filter.spec.js | 10 +++++----- .../ticket/back/methods/ticket/specs/getSales.spec.js | 1 - .../methods/ticket/specs/getTicketProblems.spec.js | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/ticket/back/methods/ticket/specs/filter.spec.js b/modules/ticket/back/methods/ticket/specs/filter.spec.js index d06d02f23..cbd799431 100644 --- a/modules/ticket/back/methods/ticket/specs/filter.spec.js +++ b/modules/ticket/back/methods/ticket/specs/filter.spec.js @@ -80,11 +80,11 @@ describe('ticket filter()', () => { const result = await models.Ticket.filter(ctx, filter, options); result.forEach(ticket => { - expect(ticket.isFreezed).toEqual(null); - expect(ticket.hasRisk).toEqual(null); - expect(ticket.hasTicketRequest).toEqual(null); - expect(ticket.hasItemShortage).toEqual(null); - expect(ticket.hasRounding).toEqual(null); + expect(ticket.isFreezed).toEqual(0); + expect(ticket.hasRisk).toEqual(0); + expect(ticket.hasTicketRequest).toEqual(0); + expect(ticket.hasItemShortage).toEqual(0); + expect(ticket.hasRounding).toEqual(0); }); await tx.rollback(); diff --git a/modules/ticket/back/methods/ticket/specs/getSales.spec.js b/modules/ticket/back/methods/ticket/specs/getSales.spec.js index 7c0a67d45..f0a99b90b 100644 --- a/modules/ticket/back/methods/ticket/specs/getSales.spec.js +++ b/modules/ticket/back/methods/ticket/specs/getSales.spec.js @@ -15,7 +15,6 @@ describe('ticket getSales()', () => { expect(sales[1].item).toBeDefined(); expect(sales[2].item).toBeDefined(); expect(sales[3].item).toBeDefined(); - expect(sales[0].claim).toBeDefined(); await tx.rollback(); } catch (e) { diff --git a/modules/ticket/back/methods/ticket/specs/getTicketProblems.spec.js b/modules/ticket/back/methods/ticket/specs/getTicketProblems.spec.js index 56c3edc1b..f46c27e4d 100644 --- a/modules/ticket/back/methods/ticket/specs/getTicketProblems.spec.js +++ b/modules/ticket/back/methods/ticket/specs/getTicketProblems.spec.js @@ -1,6 +1,6 @@ const models = require('vn-loopback/server/server').models; -fdescribe('ticket getTicketProblems()', () => { +describe('ticket getTicketProblems()', () => { const ctx = {req: {accessToken: 9}}; it('should return the problems of a ticket', async() => { const tx = await models.Ticket.beginTransaction({});