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

11 lines
334 B
JavaScript
Raw Normal View History

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