author is now on separate table

This commit is contained in:
2025-11-24 23:55:41 +01:00
parent fa49f276fe
commit 3cbe9f909e
9 changed files with 166 additions and 54 deletions

View File

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