Skip to content
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

Merged
merged 3 commits into from
Sep 19, 2023

Conversation

jinny-l
Copy link
Member

@jinny-l jinny-l commented Sep 18, 2023

🔑 Key changes

👋 To reviewers

테스트 코드 작성을 하려면 어쩔 수 없이 dto들의 생성자가 필요하여 생성자를 추가하였습니다.

✔️ Completed Issue Number

close #129

* 테스트 케이스:
  - 로그아웃 요청 - 성공 응답
  - 로그아웃 요청 - 실패 응답
  - 액세스 토큰 재발급 - 성공 응답
@jinny-l jinny-l added the ✅ test 테스트 코드 구현 label Sep 18, 2023
@jinny-l jinny-l added this to the 5주차 마일스톤 milestone Sep 18, 2023
@jinny-l jinny-l requested a review from swinb September 18, 2023 14:37
@jinny-l jinny-l self-assigned this Sep 18, 2023
Copy link

@swinb swinb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다

Comment on lines +44 to +51
protected Jwt 로그인을_한다(MemberFixture memberFixture) {
String providerName = memberFixture.getoAuthAttributes().providerName;
OAuthProfile oAuthProfile = memberFixture.toOauthProfile();

Long memberId = memberService.oAuthLogin(providerName, oAuthProfile);

return jwtService.issueJwt(memberId);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MemberFixture은 빈이 아니라 로그인 기능을 테스트에 적용하기 위한 파라미터같고
클래스 자체가 테스트 유틸 느낌인가요??

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 클래스 잘 모르겠어서 공부를 해볼게요

@jinny-l jinny-l merged commit 630c549 into stage Sep 19, 2023
@jinny-l jinny-l deleted the 129-test-인증인가-테스트-코드-작성 branch September 19, 2023 06:46
swinb pushed a commit that referenced this pull request Sep 22, 2023
* test: 인수 테스트를 위한 부모 클래스 구현

* chore: build.gradle에 RestAssured 의존성 추가

* test: 인증/인가 관련 테스트 코드 작성

* 테스트 케이스:
  - 로그아웃 요청 - 성공 응답
  - 로그아웃 요청 - 실패 응답
  - 액세스 토큰 재발급 - 성공 응답
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ test 테스트 코드 구현
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants