feat(creator): 채널 홈 조회 계약을 보정한다

This commit is contained in:
2026-06-13 18:51:52 +09:00
parent 8b2957c249
commit 951bd1b2d1
3 changed files with 17 additions and 3 deletions

View File

@@ -111,6 +111,19 @@ class DefaultCreatorChannelHomeQueryRepositoryTest @Autowired constructor(
assertEquals(5, record!!.followerCount)
}
@Test
@DisplayName("기본 회원 조회는 비크리에이터도 role과 함께 반환해 service가 기존 채널 정책 순서로 검증할 수 있게 한다")
fun shouldFindNonCreatorMemberWithRoleForServiceValidationOrder() {
val user = saveMember("non-creator-target", MemberRole.USER)
flushAndClear()
val record = repository.findCreator(user.id!!, viewerId = null)
assertNotNull(record)
assertEquals(MemberRole.USER, record!!.role)
assertEquals(user.id, record.creatorId)
}
@Test
@DisplayName("홈 repository 조회는 Phase 3 projection/bulk 최적화 대상에서 entity 전체 fetch와 per-row helper를 사용하지 않는다")
fun shouldUseProjectionAndBulkQueriesForPhaseThreeOptimizedMethods() {