Added start read date

This commit is contained in:
2025-11-20 22:55:26 +01:00
parent 4cbddfb15f
commit 0bfd0dc231
16 changed files with 263 additions and 33 deletions

View File

@@ -12,19 +12,20 @@ import (
)
type fetchedBook struct {
Title string `json:"title" binding:"required,max=300"`
Author string `json:"author" binding:"max=100"`
Summary string `json:"summary"`
Rating int `json:"rating"`
Read bool `json:"read"`
WantRead bool `json:"wantread"`
Title string `json:"title" binding:"required,max=300"`
Author string `json:"author" binding:"max=100"`
Summary string `json:"summary"`
Rating int `json:"rating"`
Read bool `json:"read"`
WantRead bool `json:"wantread"`
StartReadDate string `json:"startReadDate"`
}
func TestGetBook_Ok(t *testing.T) {
book := testGetBook(t, "5", http.StatusOK)
book := testGetBook(t, "3", http.StatusOK)
assert.Equal(t,
fetchedBook{
Title: "Rigodon",
Title: "D'un château l'autre",
Author: "Louis-Ferdinand Céline",
Rating: 10,
Read: true,