Tarea #528 /item/getSummary.js Backend unit tests
This commit is contained in:
parent
1dd4ffcc13
commit
5a4f6e2e1e
|
@ -3,12 +3,13 @@ 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);
|
||||
let keys = Object.keys(result);
|
||||
|
||||
expect(result.item).toBeDefined();
|
||||
expect(result.tags).toBeDefined();
|
||||
expect(result.botanical).toBeDefined();
|
||||
expect(result.niches).toBeDefined();
|
||||
expect(result.available).toBeDefined();
|
||||
expect(result.visible).toBeDefined();
|
||||
expect(keys).toContain('item');
|
||||
expect(keys).toContain('tags');
|
||||
expect(keys).toContain('botanical');
|
||||
expect(keys).toContain('niches');
|
||||
expect(keys).toContain('available');
|
||||
expect(keys).toContain('visible');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue