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

12 lines
404 B
JavaScript
Raw Normal View History

const models = require('vn-loopback/server/server').models;
2020-03-26 18:10:09 +00:00
describe('ticket getCollection()', () => {
it('should return a list of collections', async() => {
let ctx = {req: {accessToken: {userId: 1106}}};
let response = await models.Collection.getCollection(ctx);
2020-03-26 18:10:09 +00:00
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
});
});