diff --git a/services/loopback/common/methods/item/specs/getDiary.spec.js b/services/loopback/common/methods/item/specs/getDiary.spec.js new file mode 100644 index 000000000..6ebbbe004 --- /dev/null +++ b/services/loopback/common/methods/item/specs/getDiary.spec.js @@ -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); + }); +});