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

12 lines
369 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
describe('getSectors()', () => {
it('return list of sectors', async() => {
2023-01-24 08:04:43 +00:00
let response = await models.Collection.getSectors();
2020-03-26 18:10:09 +00:00
expect(response.length).toBeGreaterThan(0);
2020-03-30 12:28:29 +00:00
expect(response[0].id).toEqual(1);
expect(response[0].description).toEqual('First sector');
2020-03-26 18:10:09 +00:00
});
});