[Test] Admin 도메인 테스트 코드 작성 (#174)#176
Merged
Merged
Conversation
…tion) - AdminServiceTest: 계정 CRUD·비밀번호·권한 분기 단위 테스트 (Mockito) - AdminControllerTest: HTTP 계약·@Valid·Security 슬라이스 (@WebMvcTest) - AdminRepositoryTest: soft delete 제외·정렬·평가자 풀 커스텀 쿼리 (@DataJpaTest) - AdminIntegrationTest: 생성/수정/삭제/비번 end-to-end + RefreshToken 삭제 (@SpringBootTest)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
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.
💡 개요
Admin(관리자 계정) 도메인 테스트 코드를 4계층으로 작성합니다. admin 은 테스트 코드가 전혀 없던 유일한 도메인이었고, 코드 기준 명세서(
docs/test/TC-ADMIN-001~007)를 바탕으로 작성했습니다.🪐 주요 변경 사항
AdminServiceTest(Mockito): 계정 CRUD·비밀번호·권한 분기 단위 테스트 (32)AdminControllerTest(@WebMvcTest): HTTP 계약·@Valid·Security 슬라이스 (26)AdminRepositoryTest(@DataJpaTest+ Testcontainers): 커스텀 쿼리 검증 (8)AdminIntegrationTest(@SpringBootTest+ Testcontainers): end-to-end 흐름 (9)✅ 상세 내용
findAll…OrderByCreatedAtAsc,existsByUsername…,findById…,countByRole…, 평가자 풀 쿼리 등 soft delete 조건/정렬 검증🔔 참고 사항
ErrorCode.UNAUTHORIZED)로 단언 (노션 명세 403 표기와 불일치 — 팀 정렬 필요)@WebMvcTest슬라이스에JacksonConfig미로딩으로 JsonNullable PATCH 본문이 깨지던 것 →@Import에 추가해 해결docs/test/TC-ADMIN-*)는 gitignore 대상이라 본 PR 에 미포함