fix(creator): 라이브 다시듣기 첫 콘텐츠 기준을 보정한다
This commit is contained in:
@@ -108,6 +108,39 @@ class DefaultCreatorChannelLiveQueryRepositoryTest @Autowired constructor(
|
||||
assertTrue(secondPage.last().isFirstContent)
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("라이브 다시듣기의 isFirstContent는 테마가 아니라 전체 공개 오디오 콘텐츠 첫 항목을 기준으로 한다")
|
||||
fun shouldMarkFirstContentByAllPublicAudioContentsNotLiveReplayTheme() {
|
||||
val now = LocalDateTime.of(2026, 6, 17, 12, 0)
|
||||
val creator = saveMember("first-content-creator", MemberRole.CREATOR)
|
||||
saveAudioContent(
|
||||
creator = creator,
|
||||
releaseDate = now.minusDays(10),
|
||||
isAdult = false,
|
||||
theme = saveTheme("수면")
|
||||
)
|
||||
val liveReplay = saveAudioContent(
|
||||
creator = creator,
|
||||
releaseDate = now.minusDays(1),
|
||||
isAdult = false,
|
||||
theme = saveTheme("다시듣기")
|
||||
)
|
||||
flushAndClear()
|
||||
|
||||
val records = repository.findLiveReplayAudioContents(
|
||||
creatorId = creator.id!!,
|
||||
viewerId = null,
|
||||
now = now,
|
||||
canViewAdultContent = false,
|
||||
sort = ContentSort.LATEST,
|
||||
offset = 0,
|
||||
limit = 20
|
||||
)
|
||||
|
||||
assertEquals(listOf(liveReplay.id), records.map { it.audioContentId })
|
||||
assertEquals(listOf(false), records.map { it.isFirstContent })
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("라이브 다시듣기 목록은 가격 정렬을 적용한다")
|
||||
fun shouldSortLiveReplayAudioContentsByPrice() {
|
||||
|
||||
Reference in New Issue
Block a user