Added start read date
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user