-
Notifications
You must be signed in to change notification settings - Fork 7
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
CategoryControllerTest 에러코드 확인 로직 추가 및 개선 #789
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.
훌륭하네요
.andExpect(jsonPath("$.detail").value("카테고리 이름은 최대 15자까지 입력 가능합니다.")) | ||
.andExpect(jsonPath("$.errorCode").value(1101)); |
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.
켬미 굿!
사소한 리뷰 남겼으니 확인 부탁드려용
} | ||
|
||
@Test | ||
@DisplayName("카테고리 수정 실패: 중복된 이름의 카테고리 존재") | ||
void updateCategoryFailWithDuplicatedName() throws Exception { | ||
// given |
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.
이 테스트는 서비스단의 책임인 것 같다고 느껴지는데 켬미 생각은 어떤가요?0?
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.
그러네요 ~!
해당 메서드와 그 외 서비스 단 테스트인 것들은 PR과 같이 제거했습니다. ~
verify(categoryService, times(1)) | ||
.deleteById(MemberFixture.memberFixture(), categoryId); | ||
} | ||
|
||
@Test | ||
@DisplayName("카테고리 삭제 실패: 권한 없음") | ||
void deleteCategoryFailWithUnauthorized() throws Exception { | ||
// given |
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.
권한 없음이 403으로 느껴져서 로그인 되지 않은 경우 또는 회원이 아닌 경우로 변경하면 어떤가요~?
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.
켬미 굳~~~
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.
켬미 굿! 🔥🔥
⚡️ 관련 이슈
#767
📍주요 변경 사항
🎸기타
🍗 PR 첫 리뷰 마감 기한
10/17 10:00