fix(api): avoid missing-cover.jpg when getting book thumbnails (#2256)

This commit is contained in:
James Ward
2026-08-05 15:46:59 -04:00
committed by GitHub
parent 0db0100ae4
commit 142063432d
3 changed files with 11 additions and 18 deletions
@@ -310,10 +310,10 @@ class BookServiceTest {
}
@Test
void getBookCover_fileMissing_returnsByteArrayResource() {
void getBookCover_fileMissing_returnsNull() {
when(fileService.getCoverFile(1L)).thenReturn("/tmp/nonexistent2.jpg");
Resource res = bookService.getBookCover(1L);
assertTrue(res instanceof ByteArrayResource);
assertNull(res);
}
@Test