Merge branch '1933-fix_backTest' of verdnatura/salix into dev
gitea/salix/dev This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2019-12-18 06:52:36 +00:00 committed by Gitea
commit 82a548edbc
1 changed files with 7 additions and 4 deletions

View File

@ -2,13 +2,16 @@ const app = require('vn-loopback/server/server');
describe('invoiceOut book()', () => { describe('invoiceOut book()', () => {
const invoiceOutId = 1; const invoiceOutId = 1;
let invoiceOutRef; let bookedDate;
let OriginalInvoiceOut; let OriginalInvoiceOut;
let updatedInvoiceOut; let updatedInvoiceOut;
let bookedDate;
afterAll(async done => { afterAll(async done => {
updatedInvoiceOut.updateAttributes({booked: OriginalInvoiceOut.booked, hasPdf: OriginalInvoiceOut.hasPdf}); updatedInvoiceOut.updateAttributes({
booked: OriginalInvoiceOut.booked,
hasPdf: OriginalInvoiceOut.hasPdf,
amount: OriginalInvoiceOut.amount
});
done(); done();
}); });
@ -24,7 +27,7 @@ describe('invoiceOut book()', () => {
it(`should confirm the book property have been updated`, async() => { it(`should confirm the book property have been updated`, async() => {
OriginalInvoiceOut = await app.models.InvoiceOut.findById(invoiceOutId); OriginalInvoiceOut = await app.models.InvoiceOut.findById(invoiceOutId);
invoiceOutRef = OriginalInvoiceOut.ref; let invoiceOutRef = OriginalInvoiceOut.ref;
await app.models.InvoiceOut.book(invoiceOutRef); await app.models.InvoiceOut.book(invoiceOutRef);