Skip to content

Commit

Permalink
fix: fixing data loading due to date type
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Jan 6, 2025
1 parent aac4fdb commit b64c0fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void shouldNotObfuscateForNonViewers() throws Exception {
String json = mapper.writeValueAsString(getDto());
assertThat(json)
.contains("\"clientIdentification\":\"12345678\"")
.contains("\"birthdate\":\"1070-12-13\"");
.contains("\"birthdate\":\"1070-12-13T00:00\"");
}

@Test
Expand All @@ -70,7 +70,7 @@ void shouldNotObfuscateEvenIfHasViewer() throws Exception {
String json = mapper.writeValueAsString(getDto());
assertThat(json)
.contains("\"clientIdentification\":\"12345678\"")
.contains("\"birthdate\":\"1070-12-13\"");
.contains("\"birthdate\":\"1070-12-13T00:00\"");
}

private ForestClientDetailsDto getDto() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class ClientServiceIntegrationTest extends AbstractTestContainerIntegrationTest
void testGetClientDetailsWithGoodStandingIndicator() {
String clientNumber = "123456";
String corpRegnNmbr = "9607514";
LocalDateTime date = LocalDateTime.of(2021, 1, 1, 0, 0, 0);

ForestClientDetailsDto initialDto = new ForestClientDetailsDto(
clientNumber,
Expand All @@ -60,7 +61,7 @@ void testGetClientDetailsWithGoodStandingIndicator() {
"MYCO",
"678",
"Test Client",
LocalDateTime.now(),
date,
"Admin",
null,
null,
Expand Down Expand Up @@ -144,7 +145,7 @@ void testGetClientDetailsWithGoodStandingIndicator() {
"MYCO",
"678",
"Test Client",
LocalDateTime.now(),
date,
"Admin",
"Y",
null,
Expand Down

0 comments on commit b64c0fc

Please sign in to comment.