fix: delete throw error

This commit is contained in:
Vicent Llopis 2022-10-17 11:43:01 +02:00
parent 33092acee7
commit e5fd6adfe5
1 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,7 @@ describe('InvoiceOut globalInvoicing()', () => {
const userId = 1;
const companyFk = 442;
const clientId = 1101;
const addressId = 1;
const invoicedTicketId = 8;
const invoiceSerial = 'A';
const activeCtx = {
@ -22,11 +23,12 @@ describe('InvoiceOut globalInvoicing()', () => {
try {
ctx.args = {
clientId: clientId,
addressId: addressId,
invoiceDate: new Date(),
maxShipped: new Date(),
fromClientId: clientId,
toClientId: 1106,
companyFk: companyFk
companyFk: companyFk,
minShipped: new Date()
};
const result = await models.InvoiceOut.globalInvoicing(ctx, options);
const ticket = await models.Ticket.findById(invoicedTicketId, null, options);