23 lines
624 B
JavaScript
23 lines
624 B
JavaScript
const models = require('vn-loopback/server/server').models;
|
|
|
|
describe('ticket listPackaging()', () => {
|
|
it('should return the packaging', async() => {
|
|
const tx = await models.Packaging.beginTransaction({});
|
|
|
|
try {
|
|
const options = {transaction: tx};
|
|
|
|
const filter = {where: {packagingFk: 1}};
|
|
const [response] = await models.Packaging.listPackaging(filter, options);
|
|
|
|
expect(response.name).toEqual('Container ammo box 1m');
|
|
|
|
await tx.rollback();
|
|
} catch (e) {
|
|
await tx.rollback();
|
|
throw e;
|
|
}
|
|
});
|
|
});
|
|
|