feat(content): 랭킹 변동 표시 옵션을 추가한다

This commit is contained in:
2026-06-24 13:34:53 +09:00
parent 37b70a956c
commit b858003b6d
2 changed files with 20 additions and 3 deletions

View File

@@ -24,6 +24,20 @@ class ContentRankingItemTest {
assertTrue(item.isTouchable)
}
@Test
fun `showRankChange default is true`() {
val item = sampleItem()
assertTrue(item.showRankChange)
}
@Test
fun `showRankChange false item does not show rank change`() {
val item = sampleItem(showRankChange = false)
assertFalse(item.showRankChange)
}
@Test
fun `top ten blocked item hides content and creator names`() {
val item = sampleItem(rank = 10, isBlocked = true)
@@ -76,7 +90,8 @@ class ContentRankingItemTest {
rank: Int = 1,
contentName: String = "콘텐츠 이름",
creatorName: String = "크리에이터 이름",
isBlocked: Boolean = false
isBlocked: Boolean = false,
showRankChange: Boolean = true
) = ContentRankingItem(
contentId = "content-1",
creatorId = "creator-1",
@@ -87,6 +102,7 @@ class ContentRankingItemTest {
contentName = contentName,
creatorName = creatorName,
imageUrl = "https://example.com/image.png",
isBlocked = isBlocked
isBlocked = isBlocked,
showRankChange = showRankChange
)
}