fix(creator): 채널 홈 SNS xurl 파싱을 수정한다

This commit is contained in:
2026-06-15 21:00:12 +09:00
parent 1ce974938d
commit bfb5440c9e
2 changed files with 9 additions and 2 deletions

View File

@@ -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
) )

View File

@@ -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": ""
} }