20 lines
574 B
JavaScript
20 lines
574 B
JavaScript
const models = require('vn-loopback/server/server').models;
|
|
|
|
describe('invoiceIn summary()', () => {
|
|
it('should return a summary object containing data from one invoiceIn', async() => {
|
|
const tx = await models.InvoiceIn.beginTransaction({});
|
|
const options = {transaction: tx};
|
|
|
|
try {
|
|
const summary = await models.InvoiceIn.summary(1, options);
|
|
|
|
expect(summary.supplierRef).toEqual('1234');
|
|
|
|
await tx.rollback();
|
|
} catch (e) {
|
|
await tx.rollback();
|
|
throw e;
|
|
}
|
|
});
|
|
});
|