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

13 lines
466 B
JavaScript
Raw Normal View History

2023-01-24 08:04:43 +00:00
const {models} = require('vn-loopback/server/server');
2020-03-26 18:10:09 +00:00
2022-05-12 09:43:41 +00:00
describe('newCollection()', () => {
it('should return a new collection', async() => {
pending('#3400 analizar que hacer con rutas de back collection');
let ctx = {req: {accessToken: {userId: 1106}}};
2023-01-24 08:04:43 +00:00
let response = await models.Collection.newCollection(ctx, 1, 1, 1);
2020-03-26 18:10:09 +00:00
expect(response.length).toBeGreaterThan(0);
2021-09-01 09:48:21 +00:00
expect(response[0].ticketFk).toEqual(2);
2020-03-26 18:10:09 +00:00
});
});