Skip to content

Commit

Permalink
test: api 테스트에 쿠키 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
skylar1220 committed Dec 23, 2024
1 parent 8751114 commit 13c10ed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backend/src/test/java/reviewme/api/ReviewApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ class ReviewApiTest extends ApiTest {
BDDMockito.given(reviewListLookupService.getWrittenReviews(anyLong(), anyInt()))
.willReturn(response);

// CookieDescriptor[] cookieDescriptors = {
// cookieWithName("JSESSIONID").description("세션 ID")
// };
CookieDescriptor[] cookieDescriptors = {
cookieWithName("JSESSIONID").description("세션 ID")
};

ParameterDescriptor[] queryParameter = {
parameterWithName("lastReviewId").description("페이지의 마지막 리뷰 ID - 기본으로 최신순 첫번째 페이지 응답"),
Expand All @@ -385,13 +385,13 @@ class ReviewApiTest extends ApiTest {

RestDocumentationResultHandler handler = document(
"written-review-list-with-pagination",
// requestCookies(cookieDescriptors),
requestCookies(cookieDescriptors),
queryParameters(queryParameter),
responseFields(responseFieldDescriptors)
);

givenWithSpec().log().all()
// .cookie("JSESSIONID", "ASVNE1VAKDNV4")
.cookie("JSESSIONID", "ASVNE1VAKDNV4")
// .queryParam("reviewRequestCode", "hello!!")
.queryParam("lastReviewId", "2")
.queryParam("size", "5")
Expand Down

0 comments on commit 13c10ed

Please sign in to comment.