feat: 마이페이지 응답에 국내 대학교명 추가#785
Merged
Merged
Conversation
Walkthrough
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/test/java/com/example/solidconnection/siteuser/service/MyPageServiceTest.java (1)
156-168: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win1) 예외 경로도 테스트로 고정해 주세요.
- Line 156-168은 성공 케이스를 잘 검증하고 있습니다. - `findHomeUniversityName`의 실패 경로(잘못된 `homeUniversityId`로 조회 실패 시 `UNIVERSITY_NOT_FOUND`)도 한 케이스 추가하면 회귀 방지에 더 탄탄해집니다.테스트 보강 예시
+ `@Test` + void 홈대학교_ID는_있지만_대상이_없으면_예외가_발생한다() { + // given + SiteUser invalidUser = siteUserFixture.국내_대학_정보_소지_사용자(Long.MAX_VALUE); + + // when & then + assertThatThrownBy(() -> myPageService.getMyPageInfo(invalidUser.getId())) + .isInstanceOf(CustomException.class); + }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test/java/com/example/solidconnection/siteuser/service/MyPageServiceTest.java` around lines 156 - 168, Add a new test method to cover the failure path of the findHomeUniversityName operation. Create a test case that verifies the exception scenario where attempting to look up a homeUniversity with an invalid or non-existent homeUniversityId results in a UNIVERSITY_NOT_FOUND exception. This complementary test should use a fixture that creates a SiteUser with an invalid homeUniversityId and assert that the appropriate exception or error response is thrown when calling myPageService.getMyPageInfo. This ensures comprehensive coverage of both the success case (existing test 학교_인증된_멘티의_마이페이지_정보를_조회하면_국내_대학교_이름을_반환한다) and the failure case for improved regression prevention.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@src/test/java/com/example/solidconnection/siteuser/service/MyPageServiceTest.java`:
- Around line 156-168: Add a new test method to cover the failure path of the
findHomeUniversityName operation. Create a test case that verifies the exception
scenario where attempting to look up a homeUniversity with an invalid or
non-existent homeUniversityId results in a UNIVERSITY_NOT_FOUND exception. This
complementary test should use a fixture that creates a SiteUser with an invalid
homeUniversityId and assert that the appropriate exception or error response is
thrown when calling myPageService.getMyPageInfo. This ensures comprehensive
coverage of both the success case (existing test
학교_인증된_멘티의_마이페이지_정보를_조회하면_국내_대학교_이름을_반환한다) and the failure case for improved
regression prevention.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f45451c2-c320-49a2-be0d-b353118209bc
📒 Files selected for processing (3)
src/main/java/com/example/solidconnection/siteuser/dto/MyPageResponse.javasrc/main/java/com/example/solidconnection/siteuser/service/MyPageService.javasrc/test/java/com/example/solidconnection/siteuser/service/MyPageServiceTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
작업 내용
학교 이메일 인증과 관련하여 마이 페이지에서 이메일 인증 여부를 확인하기 위해
국개 대학교명을 응답에 추가하였습니다.