salix/modules/invoiceOut/back/methods/invoiceOut/specs/getTickets.spec.js

21 lines
582 B
JavaScript

const models = require('vn-loopback/server/server').models;
describe('entry getTickets()', () => {
const invoiceOutId = 4;
it('should get the ticket of an invoiceOut', async() => {
const tx = await models.InvoiceOut.beginTransaction({});
const options = {transaction: tx};
try {
const result = await models.InvoiceOut.getTickets(invoiceOutId, {}, options);
expect(result.length).toEqual(1);
await tx.rollback();
} catch (e) {
await tx.rollback();
throw e;
}
});
});