salix/modules/item/back/methods/item-shelving/specs/deleteItemShelvings.spec.js

22 lines
625 B
JavaScript
Raw Normal View History

2022-10-11 06:40:22 +00:00
const models = require('vn-loopback/server/server').models;
describe('ItemShelving deleteItemShelvings()', () => {
it('should return the deleted itemShelvings', async() => {
const tx = await models.Order.beginTransaction({});
try {
const options = {transaction: tx};
const itemShelvingIds = [1, 2];
const result = await models.ItemShelving.deleteItemShelvings(itemShelvingIds, options);
2022-10-26 07:30:17 +00:00
expect(result.length).toEqual(2);
2022-10-11 06:40:22 +00:00
await tx.rollback();
} catch (e) {
await tx.rollback();
throw e;
}
});
});