Use the same widget for books everywhere
This commit is contained in:
@@ -19,7 +19,7 @@ func TestFetchAllBooks(t *testing.T) {
|
||||
assert.Equal(t, 15, len(result.Books))
|
||||
}
|
||||
|
||||
func testFetchBooks(t *testing.T, limit string, offset string) dto.BookSearchGet {
|
||||
func testFetchBooks(t *testing.T, limit string, offset string) dto.BookItemsGet {
|
||||
router := testutils.TestSetup()
|
||||
|
||||
u, err := url.Parse("/ws/books")
|
||||
@@ -47,7 +47,7 @@ func testFetchBooks(t *testing.T, limit string, offset string) dto.BookSearchGet
|
||||
w := httptest.NewRecorder()
|
||||
router.ServeHTTP(w, req)
|
||||
|
||||
var result dto.BookSearchGet
|
||||
var result dto.BookItemsGet
|
||||
s := w.Body.String()
|
||||
err = json.Unmarshal([]byte(s), &result)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user