Skip to content

Commit 9d7bb46

Browse files
committed
test: 시간 비교를 LocalDateTime 로 하도록 변경
1 parent aa4c350 commit 9d7bb46

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/test/java/com/example/solidconnection/community/comment/service/CommentServiceTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ class 댓글_조회_테스트 {
7171
() -> assertThat(response.parentId()).isNull(),
7272
() -> assertThat(response.content()).isEqualTo(parentComment.getContent()),
7373
() -> assertThat(response.isOwner()).isTrue(),
74-
() -> assertThat(response.createdAt().toInstant())
75-
.isEqualTo(parentComment.getCreatedAt().toInstant()),
76-
() -> assertThat(response.updatedAt().toInstant())
77-
.isEqualTo(parentComment.getUpdatedAt().toInstant()),
74+
() -> assertThat(response.createdAt().toLocalDateTime())
75+
.isEqualTo(parentComment.getCreatedAt().toLocalDateTime()),
76+
() -> assertThat(response.updatedAt().toLocalDateTime())
77+
.isEqualTo(parentComment.getUpdatedAt().toLocalDateTime()),
7878

7979
() -> assertThat(response.postFindSiteUserResponse().id())
8080
.isEqualTo(parentComment.getSiteUser().getId()),
@@ -91,10 +91,10 @@ class 댓글_조회_테스트 {
9191
() -> assertThat(response.parentId()).isEqualTo(parentComment.getId()),
9292
() -> assertThat(response.content()).isEqualTo(childComment.getContent()),
9393
() -> assertThat(response.isOwner()).isFalse(),
94-
() -> assertThat(response.createdAt().toInstant())
95-
.isEqualTo(childComment.getCreatedAt().toInstant()),
96-
() -> assertThat(response.updatedAt().toInstant())
97-
.isEqualTo(childComment.getUpdatedAt().toInstant()),
94+
() -> assertThat(response.createdAt().toLocalDateTime())
95+
.isEqualTo(childComment.getCreatedAt().toLocalDateTime()),
96+
() -> assertThat(response.updatedAt().toLocalDateTime())
97+
.isEqualTo(childComment.getUpdatedAt().toLocalDateTime()),
9898

9999
() -> assertThat(response.postFindSiteUserResponse().id())
100100
.isEqualTo(childComment.getSiteUser().getId()),

0 commit comments

Comments
 (0)