diff --git a/services/order/common/methods/order/specs/new.spec.js b/services/order/common/methods/order/specs/new.spec.js index 646411f3a..d0fdf71a6 100644 --- a/services/order/common/methods/order/specs/new.spec.js +++ b/services/order/common/methods/order/specs/new.spec.js @@ -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;