salix/modules/item/back/methods/item-shelving/specs/getInventory.spec.js

20 lines
575 B
JavaScript

const models = require('vn-loopback/server/server').models;
describe('itemShelving getInventory()', () => {
it('should return a list of itemShelvings', async() => {
const tx = await models.ItemShelving.beginTransaction({});
let response;
try {
const options = {transaction: tx};
response = await models.ItemShelving.getInventory(1, 2, options);
await tx.rollback();
} catch (e) {
await tx.rollback();
throw e;
}
expect(response.length).toEqual(2);
});
});