12 lines
397 B
JavaScript
12 lines
397 B
JavaScript
const app = require('vn-loopback/server/server');
|
|
|
|
describe('item getShipped()', () => {
|
|
it('should return 3 entries and with a given balance for the first one', async() => {
|
|
let params = {where: {itemFk: 1, warehouseFk: 2}};
|
|
let result = await app.models.Item.getDiary(params);
|
|
|
|
expect(result.length).toBe(4);
|
|
expect(result[0].balance).toBe(-100);
|
|
});
|
|
});
|