Test #451
+27
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user