test #426
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||
import kr.co.vividnext.sodalive.v2.api.common.dto.RecommendationBannerResponse
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Assertions.assertFalse
|
||||
import org.junit.jupiter.api.DisplayName
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class HomeRecommendationResponseTest {
|
||||
@@ -114,4 +115,23 @@ class HomeRecommendationResponseTest {
|
||||
assertEquals(true, json["popularCommunityPosts"][1]["imageUrl"].isNull)
|
||||
assertEquals(true, json["popularCommunityPosts"][1]["audioUrl"].isNull)
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("기존 홈 라이브 추천 item 응답 스키마에는 신규 현재 진행 중 라이브 필드를 포함하지 않는다")
|
||||
fun shouldKeepHomeLiveItemSchemaWithoutTitlePriceAndBeginDateTimeUtc() {
|
||||
val item = HomeLiveItem(
|
||||
roomId = 1L,
|
||||
creatorNickname = "creator",
|
||||
creatorProfileImage = "https://cdn.test/profile.png"
|
||||
)
|
||||
|
||||
val json = objectMapper.readTree(objectMapper.writeValueAsString(item))
|
||||
|
||||
assertEquals(1L, json["roomId"].asLong())
|
||||
assertEquals("creator", json["creatorNickname"].asText())
|
||||
assertEquals("https://cdn.test/profile.png", json["creatorProfileImage"].asText())
|
||||
assertFalse(json.has("title"))
|
||||
assertFalse(json.has("price"))
|
||||
assertFalse(json.has("beginDateTimeUtc"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user