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