22 lines
625 B
JavaScript
22 lines
625 B
JavaScript
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);
|
|
|
|
expect(result.length).toEqual(2);
|
|
|
|
await tx.rollback();
|
|
} catch (e) {
|
|
await tx.rollback();
|
|
throw e;
|
|
}
|
|
});
|
|
});
|