salix/modules/worker/back/methods/department/specs/getLeaves.spec.js

19 lines
518 B
JavaScript
Raw Normal View History

2023-06-01 14:03:55 +00:00
const models = require('vn-loopback/server/server').models;
describe('department getLeaves()', () => {
it('should return the department and the childs containing the search value', async() => {
const tx = await models.Zone.beginTransaction({});
try {
let result = await models.Zone.getLeaves(null, '31');
expect(result.length).toEqual(1);
await tx.rollback();
} catch (e) {
await tx.rollback();
throw e;
}
});
});