1 parent
958de5ef22
commit
afd8d00752
2 files changed
+20
-18
No files matched your search
+19
@@ -130,6 +130,25 @@ class AppCatalogServiceTest {
|
||||
verify(commentService, never()).countByDrama(any());
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_keep_full_synopsis_on_card_when_text_exceeds_card_length() {
|
||||
String longSynopsis = "一纸婚约,开启了甜蜜又心动的同居生活。"
|
||||
+ "真相只有一个,而她亲手揭开迷雾。一场意外替嫁,让她成为冷面总裁的契约新娘。";
|
||||
Drama drama = new Drama();
|
||||
drama.setId(1L);
|
||||
drama.setTitle("第一部");
|
||||
drama.setSynopsis(longSynopsis);
|
||||
given(episodeService.firstPlayableByDramas(List.of(1L))).willReturn(Map.of());
|
||||
given(dramaCategoryService.listBasic()).willReturn(List.of());
|
||||
given(commentService.countByEpisodes(List.of())).willReturn(Map.of());
|
||||
|
||||
List<AppDramaCardVO> cards = catalogService.toCards(List.of(drama));
|
||||
|
||||
assertThat(cards).hasSize(1);
|
||||
assertThat(cards.get(0).getSynopsisLocales())
|
||||
.containsEntry("zh", longSynopsis);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_filter_feed_by_drama_type_and_expose_it_on_card() {
|
||||
Drama anime = drama(1L, "ANIME");
|
||||
|
||||
Reference in new issue
Block a user