diff --git a/src/test/kotlin/pt/up/fe/ni/website/backend/utils/ValidationTester.kt b/src/test/kotlin/pt/up/fe/ni/website/backend/utils/ValidationTester.kt index 170980cd..1ff0dc0e 100644 --- a/src/test/kotlin/pt/up/fe/ni/website/backend/utils/ValidationTester.kt +++ b/src/test/kotlin/pt/up/fe/ni/website/backend/utils/ValidationTester.kt @@ -1,6 +1,7 @@ package pt.up.fe.ni.website.backend.utils import java.time.LocalDate +import java.time.format.DateTimeFormatter import org.springframework.http.MediaType import org.springframework.test.web.servlet.ResultActions import org.springframework.test.web.servlet.result.MockMvcResultMatchers.content @@ -114,8 +115,10 @@ class ValidationTester( fun isPastDate() { // get the current date and offset it by 1 day + val timeFormatter = DateTimeFormatter.ofPattern("dd-MM-yyyy") val tomorrow = LocalDate.now() .plusDays(1) + .format(timeFormatter) .toString() val params = requiredFields.toMutableMap()