pinakes-core: update remaining modules and tests
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I9e0ff5ea33a5cf697473423e88f167ce6a6a6964
This commit is contained in:
parent
c8425a4c34
commit
3d9f8933d2
44 changed files with 1207 additions and 578 deletions
|
|
@ -161,7 +161,7 @@ fn test_book_cover_generation() {
|
|||
|
||||
// Verify all cover files exist
|
||||
for (size, path) in &covers {
|
||||
assert!(path.exists(), "Cover {:?} should exist at {:?}", size, path);
|
||||
assert!(path.exists(), "Cover {size:?} should exist at {path:?}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -176,13 +176,10 @@ async fn test_openlibrary_isbn_fetch() {
|
|||
|
||||
// Should either succeed or fail gracefully
|
||||
// We don't assert success because network might not be available
|
||||
match result {
|
||||
Ok(book) => {
|
||||
assert!(book.title.is_some());
|
||||
},
|
||||
Err(_) => {
|
||||
// Network error or book not found - acceptable in tests
|
||||
},
|
||||
if let Ok(book) = result {
|
||||
assert!(book.title.is_some());
|
||||
} else {
|
||||
// Network error or book not found - acceptable in tests
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -195,14 +192,11 @@ async fn test_googlebooks_isbn_fetch() {
|
|||
// Use a known ISBN
|
||||
let result = client.fetch_by_isbn("9780547928227").await;
|
||||
|
||||
match result {
|
||||
Ok(books) => {
|
||||
if !books.is_empty() {
|
||||
assert!(books[0].volume_info.title.is_some());
|
||||
}
|
||||
},
|
||||
Err(_) => {
|
||||
// Network error - acceptable in tests
|
||||
},
|
||||
if let Ok(books) = result {
|
||||
if !books.is_empty() {
|
||||
assert!(books[0].volume_info.title.is_some());
|
||||
}
|
||||
} else {
|
||||
// Network error - acceptable in tests
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue