diff --git a/modules/supplier/back/methods/supplier/specs/getItemsPackaging.spec.js b/modules/supplier/back/methods/supplier/specs/getItemsPackaging.spec.js new file mode 100644 index 000000000..fe8a5a489 --- /dev/null +++ b/modules/supplier/back/methods/supplier/specs/getItemsPackaging.spec.js @@ -0,0 +1,12 @@ +const app = require('vn-loopback/server/server'); + +describe('Supplier getItemsPackaging()', () => { + it('should return a summary the list of items from a determinate supplier', async() => { + const item = await app.models.Supplier.getItemsPackaging(1, 1); + + expect(item.id).toEqual(1); + expect(item.name).toEqual('Ranged weapon longbow 2m'); + expect(item.quantity).toEqual(5000); + expect(item.quantityTotal).toEqual(5100); + }); +});