ruchiD commented on code in PR #3200:
URL: https://github.com/apache/fineract/pull/3200#discussion_r1206362578
##########
fineract-provider/src/test/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBApiFilterTest.java:
##########
@@ -299,16 +297,15 @@ void shouldRunInlineCOBAndProceedWhenLoanIsBehind()
throws ServletException, IOE
LoanIdAndLastClosedBusinessDate result =
mock(LoanIdAndLastClosedBusinessDate.class);
given(result.getId()).willReturn(2L);
+
given(result.getLastClosedBusinessDate()).willReturn(businessDate.minusDays(2));
given(request.getPathInfo()).willReturn("/v1/loans/2?command=approve");
given(request.getMethod()).willReturn(HTTPMethods.POST.value());
given(loanAccountLockService.isLoanHardLocked(2L)).willReturn(false);
- given(loanAccountLockService.isLoanSoftLocked(2L)).willReturn(true);
given(fineractProperties.getQuery()).willReturn(fineractQueryProperties);
given(fineractQueryProperties.getInClauseParameterSizeLimit()).willReturn(65000);
- given(loanRepository.findAllNonClosedLoansBehindOrNullByLoanIds(
+ given(loanRepository.findAllNonClosedLoansBehindByLoanIds(
Review Comment:
LoanCOBApiFilter isLoanBehind Method calls
findAllNonClosedLoansBehindByLoanIds and not
findAllNonClosedLoansBehindOrNullByLoanIds.
The test was passing earlier as isLoanSoftLock and isLoanBehind were in OR
condition ((isLoanSoftLocked(loanIds) || isLoanBehind(loanIds)) and test was
setting softlock so isLoanBehind condition was not getting checked.
Once isSoftLock check was removed test started failing...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]