fixtures restored

This commit is contained in:
Carlos Jimenez 2018-10-03 10:50:09 +02:00
parent 0537dad01d
commit 76da96cc48
1 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,13 @@
const app = require(`${servicesDir}/ticket/server/server`);
describe('ticket new()', () => {
let ticketId;
let today = new Date();
afterAll(async() => {
await app.models.Ticket.destroyById(ticketId);
});
it('should throw an error if the address doesnt exist', async() => {
let error;
let params = {addressFk: 'invalid address', clientFk: 101};
@ -21,7 +28,9 @@ describe('ticket new()', () => {
companyFk: 442,
addressFk: 1,
agencyModeFk: 1,
userId: 9
userId: 9,
shipped: today,
landed: today
};
ticketId = await app.models.Ticket.new(params);