-
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
Api: ✨ 사용자 정의 카테고리 수정 API #121
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.
고생하셨습니다. 로직은 간단한데 RestTemplate
를 몰라서 이것저것 찾아보고 왔네요ㅎㅎㅎ
기존 통합테스트에서 MockMvc를 사용해 진행했었는데, 혹시 RestTemplate을 활용해 Servlet Container까지 실제처럼 구동시켰을 때 테스트 측면에서 얻는 이점이 뭐가있는지 여쭤봐도 될까요??
솔직히 이점보다 그냥 처음 써보느라 죽겠다는 심정밖에 안 들긴 했는데...ㅋㅋㅋㅋㅋㅋㅋ |
작업 이유
작업 사항
PATCH /v2/spending-categories/{categoryId}?name=&icon=
hasPermission()
을 사용할 때, 기존에는 pk가 -1인 경우를 예외적으로 처리하고 있습니다. 그런데 이게 특수한 경우라 메서드를 분리했습니다.리뷰어가 중점적으로 확인해야 하는 부분
RestTemplate
와 동일합니다.@SpringBootApplication
에서 랜덤 포트 개방이 필수적이라 옵션을 추가했습니다.발견한 이슈
uriComponentsBuilder.build().encode().toUri()
이렇게 하면 된다는데 안 되더라구요...^^그래서 build를 할 때 false 옵션을 주면 인코딩을 안 하고 전달한다길래 그렇게 처리했습니다.