salix/back/methods/collection/spec/getCollection.spec.js

12 lines
381 B
JavaScript
Raw Normal View History

2020-03-26 18:10:09 +00:00
const app = require('vn-loopback/server/server');
describe('getCollection()', () => {
it('return list of collection', async() => {
let ctx = {req: {accessToken: {userId: 1106}}};
2020-03-26 18:10:09 +00:00
let response = await app.models.Collection.getCollection(ctx);
2020-03-30 12:28:29 +00:00
expect(response.length).toBeGreaterThan(0);
expect(response[0].collectionFk).toEqual(1);
2020-03-26 18:10:09 +00:00
});
});