Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added time to DateInterval #204

Merged
merged 4 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ server.error.whitelabel.enabled=false
# Jackson
spring.jackson.default-property-inclusion=non_null
spring.jackson.deserialization.fail-on-null-creator-properties=true
spring.jackson.date-format=dd-MM-yyyy
spring.jackson.date-format=dd-MM-yyyy HH:mm:ss
MRita443 marked this conversation as resolved.
Show resolved Hide resolved
spring.jackson.time-zone=Europe/Lisbon

# Auth Config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ internal class ProjectControllerTest @Autowired constructor(
.andDocumentErrorResponse(documentation, hasRequestPayload = true)
},
requiredFields = mapOf(
"date" to "22-07-2021",
"date" to "22-07-2021 00:00:00",
"description" to "test description"
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ class ValidationTester(

fun isPastDate() {
val params = requiredFields.toMutableMap()
params[param] = "01-01-3000" // TODO: use a date in the future instead of hard coded
params[param] = "01-01-3000 00:00:00" // TODO: use a date in the future instead of hard coded
req(params)
.expectValidationError()
.andExpectAll(
jsonPath("$.errors[0].message").value("must be a past date"),
jsonPath("$.errors[0].value").value("01-01-3000")
jsonPath("$.errors[0].value").value("01-01-3000 00:00:00")
)
}

Expand All @@ -132,8 +132,8 @@ class ValidationTester(
)

params[param] = mapOf(
"startDate" to "09-01-2023",
"endDate" to "08-01-2023"
"startDate" to "09-01-2023 00:00:00",
"endDate" to "08-01-2023 00:00:00"
)
req(params)
.expectValidationError()
Expand Down