Skip to content

Commit

Permalink
mergeMerge branch 'feat/#67' into feat/#68
Browse files Browse the repository at this point in the history
  • Loading branch information
aiaiaiai1 committed Jul 20, 2023
2 parents a8b6aab + 8694859 commit 705f873
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void removeFavoriteCategory() {
// when & then
RestAssuredMockMvc.
given().log().all()
.when().delete("/categories/1/like")
.when().delete("/categories/{categoryId}/like", 1)
.then().log().all()
.status(HttpStatus.NO_CONTENT);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import java.time.LocalDateTime;
import java.util.List;
import java.util.Optional;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -125,8 +124,7 @@ void addFavoriteCategory() {
.socialType(SocialType.GOOGLE)
.nickname("user1")
.socialId("kakao@gmail.com")
.birthDate(
LocalDateTime.of(1995, 7, 12, 0, 0))
.birthDate(LocalDateTime.of(1995, 7, 12, 0, 0))
.build();

categoryRepository.save(category);
Expand All @@ -140,7 +138,7 @@ void addFavoriteCategory() {
// then
MemberCategory memberCategory = memberCategoryRepository.findByMemberAndCategory(member, category).get();

Assertions.assertAll(
assertAll(
() -> assertThat(memberCategory.getMember()).isSameAs(member),
() -> assertThat(memberCategory.getCategory()).isSameAs(category)
);
Expand All @@ -164,8 +162,7 @@ void removeFavoriteCategory() {
.socialType(SocialType.GOOGLE)
.nickname("user1")
.socialId("kakao@gmail.com")
.birthDate(
LocalDateTime.of(1995, 7, 12, 0, 0))
.birthDate(LocalDateTime.of(1995, 7, 12, 0, 0))
.build();

MemberCategory memberCategory = MemberCategory.builder()
Expand All @@ -183,8 +180,8 @@ void removeFavoriteCategory() {
categoryService.removeFavoriteCategory(member, categoryId);

// then
Optional<MemberCategory> foundMemberCategory = memberCategoryRepository.findByMemberAndCategory(member,
category);
Optional<MemberCategory> foundMemberCategory =
memberCategoryRepository.findByMemberAndCategory(member, category);
assertThat(foundMemberCategory).isEmpty();
}

Expand All @@ -202,8 +199,7 @@ void removeFavoriteCategoryException() {
.socialType(SocialType.GOOGLE)
.nickname("user1")
.socialId("kakao@gmail.com")
.birthDate(
LocalDateTime.of(1995, 7, 12, 0, 0))
.birthDate(LocalDateTime.of(1995, 7, 12, 0, 0))
.build();

categoryRepository.save(category);
Expand Down

0 comments on commit 705f873

Please sign in to comment.