salix/services/loopback/common/methods/item/specs/getDiary.spec.js

12 lines
408 B
JavaScript
Raw Normal View History

const app = require(`${servicesDir}/item/server/server`);
describe('item getShipped()', () => {
it('should return 3 entries, the first one with the property balance -100', async() => {
let params = {where: {itemFk: 1, warehouseFk: 2}};
let result = await app.models.Item.getDiary(params);
expect(result.length).toBe(3);
expect(result[0].balance).toBe(-100);
});
});