-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[test] 인증/인가 테스트 코드 작성 #130
The head ref may contain hidden characters: "129-test-\uC778\uC99D\uC778\uAC00-\uD14C\uC2A4\uD2B8-\uCF54\uB4DC-\uC791\uC131"
Conversation
* 테스트 케이스: - 로그아웃 요청 - 성공 응답 - 로그아웃 요청 - 실패 응답 - 액세스 토큰 재발급 - 성공 응답
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다
protected Jwt 로그인을_한다(MemberFixture memberFixture) { | ||
String providerName = memberFixture.getoAuthAttributes().providerName; | ||
OAuthProfile oAuthProfile = memberFixture.toOauthProfile(); | ||
|
||
Long memberId = memberService.oAuthLogin(providerName, oAuthProfile); | ||
|
||
return jwtService.issueJwt(memberId); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MemberFixture은 빈이 아니라 로그인 기능을 테스트에 적용하기 위한 파라미터같고
클래스 자체가 테스트 유틸 느낌인가요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 클래스 잘 모르겠어서 공부를 해볼게요
* test: 인수 테스트를 위한 부모 클래스 구현 * chore: build.gradle에 RestAssured 의존성 추가 * test: 인증/인가 관련 테스트 코드 작성 * 테스트 케이스: - 로그아웃 요청 - 성공 응답 - 로그아웃 요청 - 실패 응답 - 액세스 토큰 재발급 - 성공 응답
🔑 Key changes
👋 To reviewers
테스트 코드 작성을 하려면 어쩔 수 없이 dto들의 생성자가 필요하여 생성자를 추가하였습니다.
✔️ Completed Issue Number
close #129