Skip to content

Commit

Permalink
test: 토피 생성 테스트 검증 수정 (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdkdhoho committed Oct 26, 2024
1 parent b962466 commit 66a6b3d
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,14 @@ class 토픽_생성 {

// then
List<Topic> result = topicRepository.findAll();
Topic expect = Topic.builder()
.user(ej)
.title(new ListTitle("제일 좋아하는 여자 아이돌 TOP3"))
.description(new ListDescription("여러분들은 어떤 여돌을 가장 좋아하나요?"))
.category(DAILYLIFE_THOUGHTS)
.build();

assertAll(
() -> assertThat(result).hasSize(1),
() -> {
Topic topic = result.get(0);
assertThat(topic).usingRecursiveComparison()
.ignoringFields("id", "createdDate", "updatedDate")
.isEqualTo(expect);
assertThat(topic.getCategory()).isEqualTo(DAILYLIFE_THOUGHTS);
assertThat(topic.getTitle().getValue()).isEqualTo("제일 좋아하는 여자 아이돌 TOP3");
assertThat(topic.getDescription().getValue()).isEqualTo("여러분들은 어떤 여돌을 가장 좋아하나요?");
assertThat(topic.isAnonymous()).isFalse();
assertThat(topic.isExposed()).isFalse();
}
);
Expand Down

0 comments on commit 66a6b3d

Please sign in to comment.