devi pathak created FINERACT-2551:
-------------------------------------
Summary: 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
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)