fix: frontTest
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2022-07-21 10:11:31 +02:00
parent 699f19b0d4
commit 5446c960fb
1 changed files with 8 additions and 7 deletions

View File

@ -6,7 +6,8 @@ describe('vnInvoiceOutDescriptorMenu', () => {
let $httpParamSerializer;
const invoiceOut = {
id: 1,
client: {id: 1101}
client: {id: 1101},
ref: 'T1111111'
};
beforeEach(ngModule('invoiceOut'));
@ -40,8 +41,8 @@ describe('vnInvoiceOutDescriptorMenu', () => {
jest.spyOn(window, 'open').mockReturnThis();
const expectedParams = {
invoiceId: invoiceOut.id,
recipientId: invoiceOut.client.id
recipientId: invoiceOut.client.id,
refFk: invoiceOut.ref
};
const serializedParams = $httpParamSerializer(expectedParams);
const expectedPath = `api/csv/invoice/download?${serializedParams}`;
@ -84,9 +85,9 @@ describe('vnInvoiceOutDescriptorMenu', () => {
const $data = {email: 'brucebanner@gothamcity.com'};
const expectedParams = {
invoiceId: invoiceOut.id,
recipient: $data.email,
recipientId: invoiceOut.client.id
recipientId: invoiceOut.client.id,
refFk: invoiceOut.ref
};
const serializedParams = $httpParamSerializer(expectedParams);
@ -104,9 +105,9 @@ describe('vnInvoiceOutDescriptorMenu', () => {
const $data = {email: 'brucebanner@gothamcity.com'};
const expectedParams = {
invoiceId: invoiceOut.id,
recipient: $data.email,
recipientId: invoiceOut.client.id
recipientId: invoiceOut.client.id,
refFk: invoiceOut.ref
};
const serializedParams = $httpParamSerializer(expectedParams);