From 24d5187ac58d719451d9c886baad431e44cdccbb Mon Sep 17 00:00:00 2001 From: devholic22 Date: Sat, 13 Jul 2024 18:09:44 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20LocalDateTime=20=EB=B9=84=EA=B5=90=20?= =?UTF-8?q?=EC=A0=9C=EC=99=B8=20=EC=A7=84=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 값 비교 시 LocalDateTime 제외되도록 수정 --- .../alert/infrastructure/AlertQueryRepositoryTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/atwoz/alert/infrastructure/AlertQueryRepositoryTest.java b/src/test/java/com/atwoz/alert/infrastructure/AlertQueryRepositoryTest.java index 40722417..1b9fadf5 100644 --- a/src/test/java/com/atwoz/alert/infrastructure/AlertQueryRepositoryTest.java +++ b/src/test/java/com/atwoz/alert/infrastructure/AlertQueryRepositoryTest.java @@ -64,7 +64,9 @@ class 알림_조회_정상 { assertSoftly(softly -> { softly.assertThat(found).hasSize(9); softly.assertThat(found.hasNext()).isTrue(); - softly.assertThat(found.getContent()).isEqualTo(expected); + softly.assertThat(found.getContent()) + .usingRecursiveFieldByFieldElementComparatorIgnoringFields("createdAt", "updatedAt", "deletedAt") + .isEqualTo(expected); }); } @@ -99,7 +101,7 @@ private List extractAlertResponsesWithLimit(final List { softly.assertThat(found).isNotEmpty(); softly.assertThat(found.get()).usingRecursiveComparison() - .ignoringFields("id") + .ignoringFields("id", "createdAt", "updatedAt", "deletedAt") .isEqualTo(alert); }); }