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