7199-devToTest_2316 #2287
|
@ -53,7 +53,7 @@ module.exports = Self => {
|
||||||
AND (p.code <> ? OR ? IS NULL)
|
AND (p.code <> ? OR ? IS NULL)
|
||||||
AND (ish.shelvingFk <> ? OR ? IS NULL)
|
AND (ish.shelvingFk <> ? OR ? IS NULL)
|
||||||
AND (ish.itemFk <> ? OR ? IS NULL)`,
|
AND (ish.itemFk <> ? OR ? IS NULL)`,
|
||||||
[shelvingFkIn, parking, parking, shelvingFkOut, shelvingFkOut, itemFk, itemFk]);
|
[shelvingFkIn, parking, parking, shelvingFkOut, shelvingFkOut, itemFk, itemFk], options);
|
||||||
return result[0]['countItemOlder'] > 0;
|
return result[0]['countItemOlder'] > 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,7 @@ describe('itemShelving hasOlder()', () => {
|
||||||
it('should return false because there are not older items', async() => {
|
it('should return false because there are not older items', async() => {
|
||||||
const shelvingFkIn = 'GVC';
|
const shelvingFkIn = 'GVC';
|
||||||
const shelvingFkOut = 'HEJ';
|
const shelvingFkOut = 'HEJ';
|
||||||
const result = await models.ItemShelving.hasItemOlder(shelvingFkIn, shelvingFkOut);
|
const result = await models.ItemShelving.hasItemOlder(shelvingFkIn, null, shelvingFkOut);
|
||||||
|
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
|
@ -33,7 +33,7 @@ describe('itemShelving hasOlder()', () => {
|
||||||
await itemShelvingBefore.updateAttributes({
|
await itemShelvingBefore.updateAttributes({
|
||||||
itemFk: itemFk
|
itemFk: itemFk
|
||||||
});
|
});
|
||||||
const result = await models.ItemShelving.hasItemOlder(shelvingFkIn, parking);
|
const result = await models.ItemShelving.hasItemOlder(shelvingFkIn, parking, null, null, myOptions);
|
||||||
|
|
||||||
expect(result).toBe(true);
|
expect(result).toBe(true);
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
|
|
Loading…
Reference in New Issue