From 1bc7ea48159a9746145f1ed023216866bd24a14d Mon Sep 17 00:00:00 2001 From: gerard Date: Tue, 21 Aug 2018 08:13:35 +0200 Subject: [PATCH] Bug #589 Si cambia el estado de un ticket no se guarda el historico --- .../models/specs/ticket-tracking.spec.js | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 services/ticket/common/models/specs/ticket-tracking.spec.js diff --git a/services/ticket/common/models/specs/ticket-tracking.spec.js b/services/ticket/common/models/specs/ticket-tracking.spec.js deleted file mode 100644 index 961d1732c..000000000 --- a/services/ticket/common/models/specs/ticket-tracking.spec.js +++ /dev/null @@ -1,24 +0,0 @@ -const app = require(`${servicesDir}/ticket/server/server`); - -describe('ticket model TicketTracking', () => { - let ticketTrackingId; - - afterAll(async() => { - await app.models.TicketTracking.destroyById(ticketTrackingId); - }); - - it('should store the worker id into the instance', async() => { - let originalTrackings = await app.models.TicketTracking.find({where: {ticketFk: 1}}); - - expect(originalTrackings.length).toEqual(1); - - await app.models.TicketTracking.create({ticketFk: 1, stateFk: 20}); - let result = await app.models.TicketTracking.find({where: {ticketFk: 1}}); - - let workerFk = result[1].workerFk; - ticketTrackingId = result[1].id; - - expect(result.length).toEqual(2); - expect(workerFk).toEqual(1); - }); -});