Tarea #541 /methods/ticket/deleted.js

This commit is contained in:
gerard 2018-08-10 17:17:53 +02:00
parent 439adaf409
commit 4076934644
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
const app = require(`${servicesDir}/ticket/server/server`);
fdescribe('ticket deleted()', () => {
it('should call the getShipped method', async() => {
let oldTicket = await app.models.Ticket.findOne({where: {id: 1}});
expect(oldTicket.isDeleted).toEqual(false);
await app.models.Ticket.deleted({id: 1});
let ticket = await app.models.Ticket.findOne({where: {id: 1}, fields: ['isDeleted']});
expect(ticket.isDeleted).toEqual(true);
oldTicket.isDeleted = 0;
await app.models.Ticket.upsert(oldTicket);
});
});