Add route to get a particular book

This commit is contained in:
2025-10-24 20:06:41 +02:00
parent a21add72ce
commit 873c3c89fa
11 changed files with 188 additions and 34 deletions

View File

@@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"net/http/httptest"
"testing"
@@ -44,7 +44,7 @@ func testSearchBook(t *testing.T, searchterm string) []bookSearchGet {
var books []bookSearchGet
err := json.Unmarshal(w.Body.Bytes(), &books)
if err != nil {
log.Fatal(err)
t.Error(err)
}
assert.Equal(t, 200, w.Code)
return books