From 46eb1e6f98ec2e10becdead425e364ec860e84a3 Mon Sep 17 00:00:00 2001 From: gerard Date: Tue, 21 Aug 2018 13:31:25 +0200 Subject: [PATCH] Tarea #528 /methods/item/getSummary.js Backend unit tests --- .../common/methods/item/specs/getSummary.spec.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 services/loopback/common/methods/item/specs/getSummary.spec.js diff --git a/services/loopback/common/methods/item/specs/getSummary.spec.js b/services/loopback/common/methods/item/specs/getSummary.spec.js new file mode 100644 index 000000000..94f50ad1e --- /dev/null +++ b/services/loopback/common/methods/item/specs/getSummary.spec.js @@ -0,0 +1,14 @@ +const app = require(`${servicesDir}/item/server/server`); + +describe('item getSummary()', () => { + it('should return summary with item, tags, botanical, niches, available and visible defined ', async() => { + let result = await app.models.Item.getSummary(1); + + expect(result.item).toBeDefined(); + expect(result.tags).toBeDefined(); + expect(result.botanical).toBeDefined(); + expect(result.niches).toBeDefined(); + expect(result.available).toBeDefined(); + expect(result.visible).toBeDefined(); + }); +});