24 lines
683 B
JavaScript
24 lines
683 B
JavaScript
const {models} = require('vn-loopback/server/server');
|
|
|
|
describe('sale getFromSectorCollection()', () => {
|
|
const sectorCollectionFk = 1;
|
|
const sectorFk = 1;
|
|
|
|
beforeAll(async() => {
|
|
ctx = {
|
|
req: {
|
|
headers: {origin: 'http://localhost'},
|
|
accessToken: {userId: 40}
|
|
}
|
|
};
|
|
});
|
|
|
|
it('should find an item and a shelving', async() => {
|
|
const options = {};
|
|
const itemShelvings = await models.Sale.getFromSectorCollection(ctx, sectorCollectionFk, sectorFk, options);
|
|
|
|
expect(itemShelvings.length).toEqual(1);
|
|
expect(itemShelvings[0].carros.length).toEqual(1);
|
|
});
|
|
});
|