Skip to content

Commit

Permalink
fix: 생성일자 최신순 정렬 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
skylar1220 committed Dec 20, 2024
1 parent bd2d97a commit 1d05f2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public ReceivedReviewsResponse getReceivedReviews(Long lastReviewId, Integer siz
}

public WrittenReviewsResponse getWrittenReviews(Long lastReviewId, Integer size) {
// TODO: 생성일자 최신순 정렬
return null;
}

Expand Down
6 changes: 3 additions & 3 deletions backend/src/test/java/reviewme/api/ReviewApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ class ReviewApiTest extends ApiTest {
@Test
void 자신이_작성한_리뷰_목록을_조회한다() {
List<WrittenReviewElementResponse> writtenReviews = List.of(
new WrittenReviewElementResponse(1L, "테드1", "리뷰미", LocalDate.of(2024, 8, 1), "(리뷰 미리보기 1)",
new WrittenReviewElementResponse(1L, "테드1", "리뷰미", LocalDate.of(2024, 8, 2), "(리뷰 미리보기 1)",
List.of(new ReviewCategoryResponse(1L, "카테고리 1"))),
new WrittenReviewElementResponse(2L, "테드2", "리뷰미", LocalDate.of(2024, 8, 2), "(리뷰 미리보기 2)",
new WrittenReviewElementResponse(2L, "테드2", "리뷰미", LocalDate.of(2024, 8, 1), "(리뷰 미리보기 2)",
List.of(new ReviewCategoryResponse(2L, "카테고리 2")))
);
WrittenReviewsResponse response = new WrittenReviewsResponse(
Expand All @@ -371,7 +371,7 @@ class ReviewApiTest extends ApiTest {
fieldWithPath("lastReviewId").description("페이지의 마지막 리뷰 ID"),
fieldWithPath("isLastPage").description("마지막 페이지 여부"),

fieldWithPath("reviews[]").description("리뷰 목록"),
fieldWithPath("reviews[]").description("리뷰 목록 (생성일 기준 내림차순 정렬)"),
fieldWithPath("reviews[].reviewId").description("리뷰 ID"),
fieldWithPath("reviews[].createdAt").description("리뷰 작성 날짜"),
fieldWithPath("reviews[].contentPreview").description("리뷰 미리보기"),
Expand Down

0 comments on commit 1d05f2a

Please sign in to comment.