fix(creator): 채널 홈 SNS xurl 파싱을 수정한다
This commit is contained in:
@@ -135,7 +135,7 @@ data class CreatorChannelActivityResponse(
|
|||||||
data class CreatorChannelSnsResponse(
|
data class CreatorChannelSnsResponse(
|
||||||
@SerializedName("instagramUrl") val instagramUrl: String,
|
@SerializedName("instagramUrl") val instagramUrl: String,
|
||||||
@SerializedName("fancimmUrl") val fancimmUrl: String,
|
@SerializedName("fancimmUrl") val fancimmUrl: String,
|
||||||
@SerializedName("xUrl") val xUrl: String,
|
@SerializedName("xurl") val xUrl: String,
|
||||||
@SerializedName("youtubeUrl") val youtubeUrl: String,
|
@SerializedName("youtubeUrl") val youtubeUrl: String,
|
||||||
@SerializedName("kakaoOpenChatUrl") val kakaoOpenChatUrl: String
|
@SerializedName("kakaoOpenChatUrl") val kakaoOpenChatUrl: String
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -28,6 +28,13 @@ class CreatorChannelHomeModelsTest {
|
|||||||
assertNull(response.activity.debutDateUtc)
|
assertNull(response.activity.debutDateUtc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `home response parses x SNS url from lowercase xurl key`() {
|
||||||
|
val response = gson.fromJson(homeJson(scheduleType = "AUDIO"), CreatorChannelHomeResponse::class.java)
|
||||||
|
|
||||||
|
assertEquals("https://x.example", response.sns.xUrl)
|
||||||
|
}
|
||||||
|
|
||||||
private fun homeJson(scheduleType: String): String = """
|
private fun homeJson(scheduleType: String): String = """
|
||||||
{
|
{
|
||||||
"creator": {
|
"creator": {
|
||||||
@@ -73,7 +80,7 @@ class CreatorChannelHomeModelsTest {
|
|||||||
"sns": {
|
"sns": {
|
||||||
"instagramUrl": "",
|
"instagramUrl": "",
|
||||||
"fancimmUrl": "",
|
"fancimmUrl": "",
|
||||||
"xUrl": "",
|
"xurl": "https://x.example",
|
||||||
"youtubeUrl": "",
|
"youtubeUrl": "",
|
||||||
"kakaoOpenChatUrl": ""
|
"kakaoOpenChatUrl": ""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user