diff --git a/modules/item/back/methods/fixed-price/specs/upsertFixedPrice.spec.js b/modules/item/back/methods/fixed-price/specs/upsertFixedPrice.spec.js index 67910d417..63c211293 100644 --- a/modules/item/back/methods/fixed-price/specs/upsertFixedPrice.spec.js +++ b/modules/item/back/methods/fixed-price/specs/upsertFixedPrice.spec.js @@ -11,7 +11,7 @@ describe('upsertFixedPrice()', () => { originalItem = await app.models.Item.findById(originalFixedPrice.itemFk); }); - beforeAll(async() => { + afterAll(async() => { await originalFixedPrice.save(); await originalItem.save(); }); @@ -19,7 +19,7 @@ describe('upsertFixedPrice()', () => { it(`should toggle the hasMinPrice boolean if there's a minPrice and update the rest of the data`, async() => { const ctx = {args: { id: fixedPriceId, - itemFk: 1, + itemFk: originalFixedPrice.itemFk, warehouseFk: 1, rate2: 100, rate3: 300, @@ -41,7 +41,7 @@ describe('upsertFixedPrice()', () => { it(`should toggle the hasMinPrice boolean if there's no minPrice and update the rest of the data`, async() => { const ctx = {args: { id: fixedPriceId, - itemFk: 1, + itemFk: originalFixedPrice.itemFk, warehouseFk: 1, rate2: 2.5, rate3: 2,