This commit is contained in:
parent
cdaf8a7a67
commit
4ea1177d38
|
@ -47,29 +47,6 @@ describe('InvoiceIn filter()', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return the invoice in matching the serial number', async() => {
|
|
||||||
const tx = await models.InvoiceIn.beginTransaction({});
|
|
||||||
const options = {transaction: tx};
|
|
||||||
|
|
||||||
try {
|
|
||||||
const ctx = {
|
|
||||||
args: {
|
|
||||||
serialNumber: '1002',
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const result = await models.InvoiceIn.filter(ctx, {}, options);
|
|
||||||
|
|
||||||
expect(result.length).toEqual(1);
|
|
||||||
expect(result[0].serialNumber).toEqual(1002);
|
|
||||||
|
|
||||||
await tx.rollback();
|
|
||||||
} catch (e) {
|
|
||||||
await tx.rollback();
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return the invoice in matching the account', async() => {
|
it('should return the invoice in matching the account', async() => {
|
||||||
const tx = await models.InvoiceIn.beginTransaction({});
|
const tx = await models.InvoiceIn.beginTransaction({});
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
@ -158,7 +135,7 @@ describe('InvoiceIn filter()', () => {
|
||||||
|
|
||||||
const result = await models.InvoiceIn.filter(ctx, {}, options);
|
const result = await models.InvoiceIn.filter(ctx, {}, options);
|
||||||
|
|
||||||
expect(result.length).toEqual(5);
|
expect(result.length).toEqual(6);
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in New Issue