11 lines
387 B
JavaScript
11 lines
387 B
JavaScript
const models = require('vn-loopback/server/server').models;
|
|
|
|
describe('department getLeaves()', () => {
|
|
const ctx = {req: {accessToken: {userId: 9}}};
|
|
it('should return the department and the childs containing the search value', async() => {
|
|
let result = await models.Department.getLeaves(ctx, null, 'INFORMATICA');
|
|
|
|
expect(result.length).toEqual(1);
|
|
});
|
|
});
|