Tarea #603 /item/getDiary.js Backend unit tests

This commit is contained in:
gerard 2018-09-06 16:18:17 +02:00
parent d38540a53f
commit 767a1b02d9
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
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);
});
});