fixed unit testing: search by ISBN
This commit is contained in:
@@ -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", "")
|
||||
|
||||
Reference in New Issue
Block a user