Merge branch 'dev' of http://git.verdnatura.es/salix into dev
This commit is contained in:
commit
3d533b04ea
|
@ -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);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue