test(creator-channel): 제한 방 소유자 조회를 검증한다

This commit is contained in:
2026-09-17 19:15:27 +09:00
parent ccb00e3a08
commit 7c5d3874db
@@ -239,6 +239,33 @@ class DefaultCreatorChannelLiveQueryRepositoryTest @Autowired constructor(
assertEquals(visible.id, live!!.liveId)
}
@Test
@DisplayName("채널 소유자는 크리에이터 입장 제한이 설정된 본인 현재 라이브를 조회한다")
fun shouldReturnRestrictedCurrentLiveForChannelOwner() {
val now = LocalDateTime.of(2026, 6, 17, 12, 0)
val creator = saveMember("restricted-live-owner", MemberRole.CREATOR)
val restrictedLive = saveLiveRoom(
creator = creator,
beginDateTime = now.minusMinutes(1),
channelName = "restricted-owner-live",
isAdult = false,
genderRestriction = GenderRestriction.MALE_ONLY,
isAvailableJoinCreator = false
)
flushAndClear()
val live = repository.findCurrentLive(
creatorId = creator.id!!,
now = now,
canViewAdultContent = false,
viewerId = creator.id!!,
isViewerCreator = true,
effectiveViewerGender = Gender.MALE
)
assertEquals(restrictedLive.id, live!!.liveId)
}
@Test
@DisplayName("크리에이터 조회와 차단 관계 조회는 live service port 계약을 만족한다")
fun shouldFindCreatorAndBlockedRelationship() {