feat(creator): 채널 홈 응답 계약을 보정한다

This commit is contained in:
2026-06-13 17:58:02 +09:00
parent 3fd957a0d1
commit d1ce1221c9
3 changed files with 14 additions and 28 deletions

View File

@@ -34,9 +34,10 @@ class CreatorChannelHomeQueryServiceTest {
val response = CreatorChannelHomeResponse.from(home)
assertEquals(home.creator.creatorId, response.creator.creatorId)
assertEquals(home.creator.characterId, response.creator.characterId)
assertEquals(home.currentLive?.liveId, response.currentLive?.liveId)
assertEquals(home.latestAudioContent?.audioContentId, response.latestAudioContent?.audioContentId)
assertEquals(home.channelDonations.first().donationId, response.channelDonations.first().donationId)
assertEquals(home.channelDonations.first().message, response.channelDonations.first().message)
assertEquals(home.notices.first().postId, response.notices.first().postId)
assertEquals(home.schedules.first().targetId, response.schedules.first().targetId)
assertEquals(home.audioContents.first().audioContentId, response.audioContents.first().audioContentId)
@@ -89,6 +90,7 @@ class CreatorChannelHomeQueryServiceTest {
assertFalse(json["creator"].has("aiChatAvailable"))
assertFalse(json["creator"]["isDmAvailable"].asBoolean())
assertFalse(json["creator"].has("dmAvailable"))
assertEquals(10L, json["creator"]["characterId"].asLong())
assertTrue(json["latestAudioContent"]["isPointAvailable"].asBoolean())
assertFalse(json["latestAudioContent"].has("pointAvailable"))
assertTrue(json["latestAudioContent"]["isFirstContent"].asBoolean())
@@ -97,6 +99,13 @@ class CreatorChannelHomeQueryServiceTest {
assertFalse(json["latestAudioContent"].has("adult"))
assertTrue(json["series"][0]["isOriginal"].asBoolean())
assertFalse(json["series"][0].has("original"))
assertFalse(json["series"][0].has("published" + "DaysOfWeek"))
assertFalse(json["series"][0].has("is" + "Complete"))
assertFalse(json["series"][0].has("is" + "Popular"))
assertEquals("thanks", json["channelDonations"][0]["message"].asText())
assertFalse(json["channelDonations"][0].has("donation" + "Id"))
assertFalse(json["channelDonations"][0].has("member" + "Id"))
assertFalse(json["channelDonations"][0].has("is" + "Secret"))
}
private fun createHome(): CreatorChannelHome {
@@ -118,6 +127,7 @@ class CreatorChannelHomeQueryServiceTest {
return CreatorChannelHome(
creator = CreatorChannelCreator(
creatorId = 1L,
characterId = 10L,
nickname = "creator",
profileImageUrl = "profile.png",
followerCount = 100,
@@ -149,12 +159,9 @@ class CreatorChannelHomeQueryServiceTest {
),
channelDonations = listOf(
CreatorChannelDonation(
donationId = 401L,
memberId = 2L,
nickname = "fan",
profileImageUrl = "fan.png",
can = 50,
isSecret = false,
message = "thanks",
createdAt = LocalDateTime.of(2026, 6, 12, 2, 0)
)
@@ -189,11 +196,8 @@ class CreatorChannelHomeQueryServiceTest {
seriesId = 601L,
title = "series",
coverImageUrl = "series.png",
publishedDaysOfWeek = "MON",
isComplete = false,
numberOfContent = 3,
isNew = true,
isPopular = false,
isOriginal = true
)
),