Skip to content

Commit

Permalink
test: 수정사항 테스트 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimprodp committed Feb 13, 2025
1 parent e5f208f commit 55be95f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions backend/src/test/java/reviewme/api/ReviewGroupApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.nullable;
import static org.springframework.restdocs.cookies.CookieDocumentation.cookieWithName;
Expand All @@ -13,7 +14,7 @@
import static org.springframework.restdocs.request.RequestDocumentation.parameterWithName;
import static org.springframework.restdocs.request.RequestDocumentation.queryParameters;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.mockito.BDDMockito;
Expand Down Expand Up @@ -169,11 +170,11 @@ class ReviewGroupApiTest extends ApiTest {
void 회원이_생성한_프로젝트_목록을_반환한다() {
ReviewGroupPageResponse response = new ReviewGroupPageResponse(2L, true,
List.of(
new ReviewGroupPageElementResponse("이동훈", "우테코", LocalDate.of(2024, 1, 30), "WOOTECO1", 1),
new ReviewGroupPageElementResponse("아루", "리뷰미", LocalDate.of(2024, 1, 5), "ABCD1234", 2)
new ReviewGroupPageElementResponse(1L, "이동훈", "우테코", "WOOTECO1", LocalDateTime.of(2024, 1, 30, 0, 0), 1),
new ReviewGroupPageElementResponse(2L, "아루", "리뷰미", "ABCD1234", LocalDateTime.of(2024, 1, 5, 0, 0), 2)
)
);
BDDMockito.given(reviewGroupLookupService.getMyReviewGroups())
BDDMockito.given(reviewGroupLookupService.getMyReviewGroups(nullable(Long.class), nullable(Integer.class), anyLong()))
.willReturn(response);

CookieDescriptor[] cookieDescriptors = {
Expand All @@ -184,10 +185,11 @@ class ReviewGroupApiTest extends ApiTest {
fieldWithPath("lastReviewGroupId").description("해당 페이지의 마지막 리뷰 그룹 ID"),
fieldWithPath("isLastPage").description("마지막 페이지 여부"),
fieldWithPath("reviewGroups[]").description("리뷰 그룹 목록 (생성일 기준 내림차순 정렬)"),
fieldWithPath("reviewGroups[].reviewGroupId").description("리뷰 그룹 ID"),
fieldWithPath("reviewGroups[].revieweeName").description("리뷰이 이름"),
fieldWithPath("reviewGroups[].projectName").description("프로젝트 이름"),
fieldWithPath("reviewGroups[].createdAt").description("생성일"),
fieldWithPath("reviewGroups[].reviewRequestCode").description("리뷰 요청 코드"),
fieldWithPath("reviewGroups[].createdAt").description("생성일"),
fieldWithPath("reviewGroups[].reviewCount").description("작성된 리뷰 수")
};

Expand Down

0 comments on commit 55be95f

Please sign in to comment.