-
Notifications
You must be signed in to change notification settings - Fork 0
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: 유저 프로필 수정 기능 구현 #61
Conversation
Test Results48 tests 47 ✅ 5s ⏱️ Results for commit 41dcbae. ♻️ This comment has been updated with latest results. |
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.
고생하셨습니다
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.
request1 method에서도 토큰 생성 메서드로 적용 부탁드립니다!
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.
적용돼있습니다!
final ProfileUpdateRequest body = getConstructorMonkey().giveMeBuilder(ProfileUpdateRequest.class) | ||
.set("nickname", Arbitraries.strings().withCharRange('a', 'z').ofMinLength(1).ofMaxLength(20)) | ||
.set("profileImageUrl", Arbitraries.strings().withCharRange('a', 'z').ofMinLength(1).ofMaxLength(200)) | ||
.set("email", Arbitraries.strings().withCharRange('a', 'z').ofMinLength(1).ofMaxLength(50)) | ||
.set("gender", Arbitraries.of(Gender.class)) | ||
.set("birthday", LocalDate.now()) | ||
.sample(); |
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.
ConstructorMonkey를 이용해서 Fixture만들면 이렇게 커스텀하지 않아도 자동으로 값이 들어간 ProfileUpdateRequest 인스턴스가 생성될텐데 코드 중복때매 불편하면 한번 확인해보세용!
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.
통합 테스트 시, 엔티티의 컬럼도 신경써야해서요, 범위를 지정하지 않으면 data too long
에러가 경우에 따라 발생합니다,,
#52
유저 프로필 수정 API를 구현하였습니다. 테스트를 작성하던 중 JWT 관련해서 통합 테스트 관련 추상 클래스에
getAuthToken()
메서드를 추가하였고, 테스트에 반영했으니 참고해주세요.ps. patch가 아닌 put을 활용한 이유는 TestRestTemplate에 Patch 관련 설정이 불가능해서입니다. (RestTemplate으로 바꾸면 가능한데, 의존성도 추가해야 해서 모든 업데이트 API에 대하여 PUT을 활용하는게 어떨지 의견 드립니다.)