Skip to content

Commit

Permalink
feat: 테스트시 로그인 쿠키를 얻을 수 있는 메서드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
70825 committed Jul 26, 2023
1 parent 8f0a0a3 commit ebf8572
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions backend/src/test/java/com/funeat/acceptance/common/LoginSteps.java
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();
}
}

0 comments on commit ebf8572

Please sign in to comment.