[
https://issues.apache.org/jira/browse/FINERACT-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18070219#comment-18070219
]
devi pathak commented on FINERACT-2551:
---------------------------------------
Test case has been implemented and merged as part of FINERACT-2550.
PR: https://github.com/apache/fineract/pull/5667
> Add test for unsupported templateType in retrieveApprovalTemplate
> -----------------------------------------------------------------
>
> Key: FINERACT-2551
> URL: https://issues.apache.org/jira/browse/FINERACT-2551
> Project: Apache Fineract
> Issue Type: Task
> Components: Loan
> Reporter: devi pathak
> Priority: Minor
> Labels: beginner, beginner-friendly
>
> Add a test case for LoansApiResource.retrieveApprovalTemplate(...) to verify
> that an unsupported templateType results in a
> NotSupportedLoanTemplateTypeException.
>
> *Context*
> Currently, retrieveApprovalTemplate validates the templateType and throws an
> exception for unsupported values. This test ensures that the validation
> behavior is preserved and prevents regressions.
>
> *What is being tested*
> - Passing an unsupported templateType (e.g. "unsupportedType")
> - Verifying that NotSupportedLoanTemplateTypeException is thrown
> - Ensuring that downstream services (LoanReadPlatformService) are not invoked
> - Verifying that read permission validation is performed
>
> *Expected Behavior*
> The API should throw NotSupportedLoanTemplateTypeException when an
> unsupported templateType is provided.
>
> *Impact*
> - Improves test coverage for loan API validation
> - Prevents silent failures or regressions in template handling
> - Ensures consistent API behavior
>
> *Related*
> This test validates the behavior introduced in FINERACT-2550.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)