From 127add41d68cdbe3306796284b85c6dd2fd27506 Mon Sep 17 00:00:00 2001 From: Jose Alberto Hernandez Date: Fri, 5 Apr 2024 09:37:08 -0600 Subject: [PATCH] Fix legacy integration test cases for specific holiday --- .../fineract/integrationtests/SchedulerJobsTestResults.java | 2 ++ .../fineract/integrationtests/common/HolidayHelper.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/SchedulerJobsTestResults.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/SchedulerJobsTestResults.java index a54b5cb33..f16e3cf19 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/SchedulerJobsTestResults.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/SchedulerJobsTestResults.java @@ -550,6 +550,8 @@ public class SchedulerJobsTestResults { Assertions.assertEquals(LocalDate.of(2024, 6, 4), dueDate, "Verifying Repayment Rescheduled Date after Running Apply Holidays to Loans Scheduler Job"); + // Remove the Holiday created + HolidayHelper.deleteHoliday(requestSpec, responseSpec, holidayId); } @Test diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/HolidayHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/HolidayHelper.java index 163057505..dd66b21be 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/HolidayHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/HolidayHelper.java @@ -112,4 +112,10 @@ public class HolidayHelper { return response; } + public static Integer deleteHoliday(final RequestSpecification requestSpec, final ResponseSpecification responseSpec, + final Integer holidayID) { + final String DELETE_HOLIDAY_URL = HOLIDAYS_URL + "/" + holidayID + "?" + Utils.TENANT_IDENTIFIER; + return Utils.performServerDelete(requestSpec, responseSpec, DELETE_HOLIDAY_URL, "{}", "resourceId"); + } + }