test(donation): 후원 header 색상 경계를 검증한다
This commit is contained in:
@@ -45,7 +45,7 @@ class CreatorChannelDonationMapperTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `후원 createdAtUtc는 상대 시간으로 매핑하고 can 기준 header color를 계산한다`() {
|
fun `후원 createdAtUtc는 상대 시간으로 매핑하고 can 기준 header color를 계산한다`() {
|
||||||
val item = listOf(donation(can = 500, createdAtUtc = System.currentTimeMillis().toString()))
|
val item = listOf(donation(can = 501, createdAtUtc = System.currentTimeMillis().toString()))
|
||||||
.toDonationUiModels(context, relativeTimeTextFormatter)
|
.toDonationUiModels(context, relativeTimeTextFormatter)
|
||||||
.single()
|
.single()
|
||||||
|
|
||||||
@@ -53,6 +53,15 @@ class CreatorChannelDonationMapperTest {
|
|||||||
assertEquals(R.color.red_400, item.headerColorResId)
|
assertEquals(R.color.red_400, item.headerColorResId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `후원 header color는 501캔부터 red_400으로 매핑한다`() {
|
||||||
|
val items = listOf(donation(can = 500), donation(can = 501))
|
||||||
|
.toDonationUiModels(context, relativeTimeTextFormatter)
|
||||||
|
|
||||||
|
assertEquals(R.color.creator_channel_donation_cyan, items[0].headerColorResId)
|
||||||
|
assertEquals(R.color.red_400, items[1].headerColorResId)
|
||||||
|
}
|
||||||
|
|
||||||
private fun ranking(
|
private fun ranking(
|
||||||
userId: Long,
|
userId: Long,
|
||||||
nickname: String = "member",
|
nickname: String = "member",
|
||||||
|
|||||||
Reference in New Issue
Block a user