fixed getSummary unit test
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-05-24 11:28:23 +02:00
parent ec7cc169f5
commit e418d6239b
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');