2021-10-07 07:57:07 +00:00
|
|
|
const models = require('vn-loopback/server/server').models;
|
2018-08-10 09:40:48 +00:00
|
|
|
|
2022-09-19 08:11:44 +00:00
|
|
|
describe('ticket listPackaging()', () => {
|
2020-10-15 16:57:27 +00:00
|
|
|
it('should return the packaging', async() => {
|
2021-10-07 07:57:07 +00:00
|
|
|
const tx = await models.Packaging.beginTransaction({});
|
2018-08-10 09:40:48 +00:00
|
|
|
|
2021-10-07 07:57:07 +00:00
|
|
|
try {
|
|
|
|
const options = {transaction: tx};
|
|
|
|
|
|
|
|
const filter = {where: {packagingFk: 1}};
|
2022-08-04 07:53:22 +00:00
|
|
|
const [response] = await models.Packaging.listPackaging(filter, options);
|
2021-10-07 07:57:07 +00:00
|
|
|
|
2023-09-01 09:52:48 +00:00
|
|
|
expect(response.name).toEqual('Container ammo box 100cm');
|
2021-10-07 07:57:07 +00:00
|
|
|
|
|
|
|
await tx.rollback();
|
|
|
|
} catch (e) {
|
|
|
|
await tx.rollback();
|
|
|
|
throw e;
|
|
|
|
}
|
2018-08-10 09:40:48 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|