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

[Feature] 닉네임 중복 검사 API 구현 #20

Merged
merged 4 commits into from
Oct 28, 2023

Conversation

kyeong-hyeok
Copy link
Member

💡 연관된 이슈

close #19

📝 작업 내용

닉네임 중복 검사 API 구현

  • TestUserArgumentResolver 생성
    • TestUserArgumentResolver를 추가한 이유는 Spring Security가 적용된 기능을 테스트할 때 인증 정보를 먼저 주입해줘야 하기 때문인데, 현재 닉네임 중복 검사 API는 필요 없지만 다른 API를 사용할 때는 막힐 것이라 미리 추가했습니다!
  • Controller 테스트 코드 추가

💬 리뷰 요구 사항

@kyeong-hyeok kyeong-hyeok added ✨ Feature 기능 개발 Priority: Low 우선순위 낮음 🐯 Koeyhk 담당자 labels Oct 28, 2023
@kyeong-hyeok kyeong-hyeok linked an issue Oct 28, 2023 that may be closed by this pull request
2 tasks
Copy link
Member

@hojeong2747 hojeong2747 left a comment

Choose a reason for hiding this comment

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

테스트 코드 신기하고 멋지다 👍
좋은 레퍼런스 감사합니다ㅎㅎ

public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception {
UserDetails userDetails = mock(UserDetails.class);
given(userDetails.getUsername()).willReturn("email");
return userDetails;
Copy link
Member

Choose a reason for hiding this comment

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

오오 인증 후 접근하는 API들을 위해 가짜 UserDetails 객체를 반환하는 거구나

@kyeong-hyeok kyeong-hyeok merged commit ec2b270 into develop Oct 28, 2023
1 check passed
@kyeong-hyeok kyeong-hyeok deleted the feat/19-nickname-isduplicated-api branch October 28, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 개발 🐯 Koeyhk 담당자 Priority: Low 우선순위 낮음
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] 닉네임 중복 검사 API 구현
2 participants