From fdf731ff5d44b2f063e30ab65d10cf366ab7f6ed Mon Sep 17 00:00:00 2001 From: Alisher Musurmonov Date: Tue, 15 Aug 2023 12:22:48 +0500 Subject: [PATCH] tests: add more test coverages --- src/invoices/InvoiceDetails/utils.test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/invoices/InvoiceDetails/utils.test.js b/src/invoices/InvoiceDetails/utils.test.js index 55fb6066..b43c9765 100644 --- a/src/invoices/InvoiceDetails/utils.test.js +++ b/src/invoices/InvoiceDetails/utils.test.js @@ -121,6 +121,7 @@ describe('showUpdateInvoiceError', () => { ['incorrectFundDistributionTotal', 'ui-invoice.invoice.actions.approve.error.incorrectFundDistributionTotal', ['invoiceLineNumber']], ['budgetNotFoundByFundId', 'ui-invoice.invoice.actions.approve.error.budgetNotFoundByFundId', ['fund', 'fundCode']], ['budgetNotFoundByFundId', 'defaultErrorMessageId', []], + ['fundCannotBePaid', 'ui-invoice.invoice.actions.approve.error.fundCannotBePaid', ['funds']], ])('should get %s error message', async (code, messageId, key) => { const mockActionName = 'approve'; const parameters = key.map(k => ({ key: k, value: 'value' })); @@ -128,6 +129,8 @@ describe('showUpdateInvoiceError', () => { if (code === 'budgetNotFoundByFundId') { values = parameters.length ? { values: { fundCode: 'value' } } : {}; + } else if (code === 'fundCannotBePaid') { + values = { values: { fundCodes: 'value' } }; } const mockResponse = {