From e418d6239b3a9bf654ef66391b3ae0e73906449e Mon Sep 17 00:00:00 2001 From: carlosjr Date: Mon, 24 May 2021 11:28:23 +0200 Subject: [PATCH] fixed getSummary unit test --- modules/item/back/methods/item/specs/getSummary.spec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/item/back/methods/item/specs/getSummary.spec.js b/modules/item/back/methods/item/specs/getSummary.spec.js index 2dfa0cd99..4a6d18e1b 100644 --- a/modules/item/back/methods/item/specs/getSummary.spec.js +++ b/modules/item/back/methods/item/specs/getSummary.spec.js @@ -2,7 +2,8 @@ const app = require('vn-loopback/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); + const ctx = {req: {accessToken: {userId: 1}}}; + let result = await app.models.Item.getSummary(ctx, 1); let keys = Object.keys(result); expect(keys).toContain('item');