fixed getSummary unit test #631

Merged
joan merged 1 commits from back_unit_test_fix into dev 2021-05-24 10:09:03 +00:00
1 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,8 @@ const app = require('vn-loopback/server/server');
describe('item getSummary()', () => { describe('item getSummary()', () => {
it('should return summary with item, tags, botanical, niches, available and visible defined ', async() => { 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); let keys = Object.keys(result);
expect(keys).toContain('item'); expect(keys).toContain('item');