order is now deleted upon execution

This commit is contained in:
Carlos Jimenez 2018-09-18 08:58:15 +02:00
parent 18fe2e16af
commit 7bc2d0339d
1 changed files with 7 additions and 1 deletions

View File

@ -2,6 +2,12 @@ const app = require(`${servicesDir}/order/server/server`);
const UserError = require('vn-loopback/common/helpers').UserError;
describe('order new()', () => {
let orderId;
afterAll(async() => {
await app.models.Order.destroyById(orderId);
});
it('should throw an error if the client is frozen', async() => {
let error;
let params = {addressFk: 121};
@ -57,7 +63,7 @@ describe('order new()', () => {
addressFk: 125
};
let orderId = await app.models.Order.new(params);
orderId = await app.models.Order.new(params);
let highestOrderIdInFixtures = 3;