fixed unit test for upsertFixedPrice
This commit is contained in:
parent
f7cca6638a
commit
fe04f00c28
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue