Tarea #541 /methods/ticket/deleted.js
This commit is contained in:
parent
439adaf409
commit
4076934644
|
@ -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);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue