Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.3.5 #25

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public ResponseEntity<Void> toggleLikeReview(@PathVariable final Long productId,
@AuthenticationPrincipal final LoginInfo loginInfo,
@RequestBody @Valid final ReviewFavoriteRequest request) {
reviewService.likeReview(reviewId, loginInfo.getId(), request);
reviewService.updateProductImage(productId);

return ResponseEntity.noContent().build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,26 +287,6 @@ class toggleLikeReview_성공_테스트 {
// then
STATUS_CODE를_검증한다(응답, 정상_처리_NO_CONTENT);
}

@Test
void 상품_이미지가_존재하는_좋아요를_가장_많이_받은_리뷰로_상품_이미지가_바뀐다() {
// given
final var 카테고리 = 카테고리_즉석조리_생성();
단일_카테고리_저장(카테고리);
final var 상품 = 단일_상품_저장(상품_삼각김밥_가격1000원_평점3점_생성(카테고리));
final var 태그 = 단일_태그_저장(태그_맛있어요_TASTE_생성());
리뷰_작성_요청(로그인_쿠키_획득(멤버1), 상품, 사진_명세_요청(이미지1), 리뷰추가요청_재구매O_생성(점수_4점, List.of(태그)));
리뷰_작성_요청(로그인_쿠키_획득(멤버1), 상품, 사진_명세_요청(이미지2), 리뷰추가요청_재구매O_생성(점수_1점, List.of(태그)));

리뷰_좋아요_요청(로그인_쿠키_획득(멤버1), 상품, 리뷰2, 리뷰좋아요요청_생성(좋아요O));

// when
final var 응답 = 상품_상세_조회_요청(상품);

// then
STATUS_CODE를_검증한다(응답, 정상_처리);
상품_사진을_검증한다(응답, "2.png");
}
}

@Nested
Expand Down
Loading