20 lines
639 B
JavaScript
20 lines
639 B
JavaScript
const {models} = require('vn-loopback/server/server');
|
|
|
|
describe('itemShelving getAlternative()', () => {
|
|
beforeAll.mockLoopBackContext();
|
|
|
|
it('should return a list of items without alternatives', async() => {
|
|
const shelvingFk = 'HEJ';
|
|
const itemShelvings = await models.ItemShelving.getAlternative(shelvingFk);
|
|
|
|
expect(itemShelvings[0].shelvings.length).toEqual(0);
|
|
});
|
|
|
|
it('should return an empty list', async() => {
|
|
const shelvingFk = 'ZZP';
|
|
const itemShelvings = await models.ItemShelving.getAlternative(shelvingFk);
|
|
|
|
expect(itemShelvings.length).toEqual(0);
|
|
});
|
|
});
|