-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: 로그인 관련 테스트시 쿠키를 얻을 수 있는 공용 메서드 추가
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
backend/src/test/java/com/funeat/acceptance/common/LoginSteps.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.funeat.acceptance.common; | ||
|
||
import io.restassured.RestAssured; | ||
import io.restassured.http.Cookies; | ||
import io.restassured.response.ExtractableResponse; | ||
import io.restassured.response.Response; | ||
|
||
@SuppressWarnings("NonAsciiCharacters") | ||
public class LoginSteps { | ||
|
||
public static Cookies 로그인_쿠키를_얻는다() { | ||
final ExtractableResponse<Response> response = RestAssured.given() | ||
.queryParam("code", "test") | ||
.when() | ||
.get("/login/oauth2/code/kakao") | ||
.then() | ||
.extract(); | ||
|
||
return response.detailedCookies(); | ||
} | ||
} |