2018-08-21 11:31:25 +00:00
|
|
|
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);
|
2018-08-22 07:09:16 +00:00
|
|
|
let keys = Object.keys(result);
|
2018-08-21 11:31:25 +00:00
|
|
|
|
2018-08-22 07:09:16 +00:00
|
|
|
expect(keys).toContain('item');
|
|
|
|
expect(keys).toContain('tags');
|
|
|
|
expect(keys).toContain('botanical');
|
|
|
|
expect(keys).toContain('niches');
|
|
|
|
expect(keys).toContain('available');
|
|
|
|
expect(keys).toContain('visible');
|
2018-08-21 11:31:25 +00:00
|
|
|
});
|
|
|
|
});
|