Refactor: make only one API route to update userbooks
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"git.artlef.fr/bibliomane/internal/config"
|
||||
"git.artlef.fr/bibliomane/internal/setup"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestSetup() *gin.Engine {
|
||||
@@ -62,5 +61,7 @@ func TestBookPutCallWithDemoPayload(t *testing.T, payload string, bookId string,
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token))
|
||||
w := httptest.NewRecorder()
|
||||
router.ServeHTTP(w, req)
|
||||
assert.Equal(t, expectedCode, w.Code)
|
||||
if w.Code != expectedCode {
|
||||
t.Errorf("%s", w.Body.String())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user