Skip to content

Commit

Permalink
test: 로그인 관련 테스트시 쿠키를 얻을 수 있는 공용 메서드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
70825 committed Jul 26, 2023
1 parent e60f709 commit 4dfcfba
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 4dfcfba

Please sign in to comment.