fix(live-room): 무료 라이브 라이트 팝업 노출 조건을 추가한다

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-04-20 16:03:42 +09:00
parent 68e8941cc1
commit d8221dc784
4 changed files with 203 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
package kr.co.vividnext.sodalive.live.room
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
class LiveRoomDaroLightPopupPolicyTest {
@Test
fun `비방장 무료 라이브에서 아직 시도하지 않았으면 라이트 팝업을 노출한다`() {
assertTrue(
shouldAttemptLiveRoomDaroLightPopup(
isHost = false,
roomPrice = 0,
hasAttemptedPopup = false
)
)
}
@Test
fun `방장이면 무료 라이브여도 라이트 팝업을 노출하지 않는다`() {
assertFalse(
shouldAttemptLiveRoomDaroLightPopup(
isHost = true,
roomPrice = 0,
hasAttemptedPopup = false
)
)
}
@Test
fun `유료 라이브면 비방장이어도 라이트 팝업을 노출하지 않는다`() {
assertFalse(
shouldAttemptLiveRoomDaroLightPopup(
isHost = false,
roomPrice = 100,
hasAttemptedPopup = false
)
)
}
@Test
fun `이미 시도한 액티비티 인스턴스에서는 다시 노출하지 않는다`() {
assertFalse(
shouldAttemptLiveRoomDaroLightPopup(
isHost = false,
roomPrice = 0,
hasAttemptedPopup = true
)
)
}
}