salix/modules/invoiceIn/back/methods/invoice-in/specs/summary.spec.js

20 lines
568 B
JavaScript
Raw Normal View History

2021-04-15 08:44:25 +00:00
const app = require('vn-loopback/server/server');
describe('invoiceIn summary()', () => {
it('should return a summary object containing data from one invoiceIn', async() => {
2021-06-28 08:15:54 +00:00
const tx = await app.models.Entry.beginTransaction({});
const options = {transaction: tx};
2021-04-15 08:44:25 +00:00
2021-06-28 08:15:54 +00:00
try {
const summary = await app.models.InvoiceIn.summary(1, options);
expect(summary.supplierRef).toEqual('1234');
await tx.rollback();
} catch (e) {
await tx.rollback();
throw e;
}
2021-04-15 08:44:25 +00:00
});
});