Skip to content

Commit

Permalink
tests: fix date format
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-sucena committed Oct 26, 2024
1 parent 722f705 commit 3e37e8c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 3e37e8c

Please sign in to comment.