salix/modules/ticket/back/methods/packaging/specs/listPackaging.spec.js

23 lines
625 B
JavaScript
Raw Normal View History

const models = require('vn-loopback/server/server').models;
2018-08-10 09:40:48 +00:00
describe('ticket listPackaging()', () => {
2020-10-15 16:57:27 +00:00
it('should return the packaging', async() => {
const tx = await models.Packaging.beginTransaction({});
2018-08-10 09:40:48 +00:00
try {
const options = {transaction: tx};
const filter = {where: {packagingFk: 1}};
const response = await models.Packaging.listPackaging(filter, options);
expect(response[0].name).toEqual('Container ammo box 1m');
await tx.rollback();
} catch (e) {
await tx.rollback();
throw e;
}
2018-08-10 09:40:48 +00:00
});
});