Merge pull request 'fixed getSummary unit test' (#631) from back_unit_test_fix into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #631
This commit is contained in:
Joan Sanchez 2021-05-24 10:08:59 +00:00
commit b02d7b3a3b
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()', () => {
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');