12 lines
380 B
JavaScript
12 lines
380 B
JavaScript
const app = require('vn-loopback/server/server');
|
|
|
|
describe('getCollection()', () => {
|
|
it('return list of collection', async() => {
|
|
let ctx = {req: {accessToken: {userId: 106}}};
|
|
let response = await app.models.Collection.getCollection(ctx);
|
|
|
|
expect(response.length).toBeGreaterThan(0);
|
|
expect(response[0].collectionFk).toEqual(1);
|
|
});
|
|
});
|