fix(home): AI 캐릭터 홈 노출 개수를 늘린다
This commit is contained in:
+16
@@ -243,6 +243,22 @@ class HomeRecommendationControllerTest @Autowired constructor(
|
||||
.andExpect(jsonPath("$.data.lives").isArray)
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("메인 홈 통합 조회는 AI 캐릭터를 최신 스냅샷 기준 최대 20개까지 반환한다")
|
||||
fun shouldReturnTwentyAiCharactersOnHomeRecommendations() {
|
||||
(1..22).forEach { index ->
|
||||
val character = saveAiCharacter("home-ai-character-$index")
|
||||
saveRecommendationSnapshot(character.id!!)
|
||||
}
|
||||
entityManager.flush()
|
||||
entityManager.clear()
|
||||
|
||||
mockMvc.perform(get("/api/v2/home/recommendations"))
|
||||
.andExpect(status().isOk)
|
||||
.andExpect(jsonPath("$.success").value(true))
|
||||
.andExpect(jsonPath("$.data.aiCharacters.length()").value(20))
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("메인 홈 통합 조회 실패는 응답 시간과 함께 로그로 관측된다")
|
||||
fun shouldLogHomeRecommendationFailure(output: CapturedOutput) {
|
||||
|
||||
Reference in New Issue
Block a user