fixed unit testing: search by ISBN

This commit is contained in:
2026-02-02 18:09:46 +01:00
parent 464405f5c9
commit 21162cc63e

View File

@@ -67,21 +67,21 @@ func TestSearchBook_OneBookRead(t *testing.T) {
result.Books)
}
//func TestSearchBook_ISBN(t *testing.T) {
// result := testSearchBook(t, "9782070337903", "", "")
// assert.Equal(t, int64(1), result.Count)
// assert.Equal(t,
// []bookSearchGetBook{{
// Title: "Le complot contre l'Amérique",
// Author: "Philip Roth",
// Id: 22,
// Rating: 6,
// Read: true,
// WantRead: false,
// CoverPath: "/bookcover/lecomplotcontrelamerique.jpg",
// }},
// result)
//}
func TestSearchBook_ISBN(t *testing.T) {
result := testSearchBook(t, "9782070337903", "", "")
assert.Equal(t, int64(1), result.Count)
assert.Equal(t,
[]bookSearchGetBook{{
Title: "Le complot contre l'Amérique",
Author: "Philip Roth",
Id: 22,
Rating: 6,
Read: true,
WantRead: false,
CoverPath: "/bookcover/lecomplotcontrelamerique.jpg",
}},
result.Books)
}
func TestSearchBook_Limit(t *testing.T) {
result := testSearchBook(t, "a", "10", "")