Skip to content

Commit

Permalink
test(router): update unit test on feching all books
Browse files Browse the repository at this point in the history
  • Loading branch information
jeamon committed Nov 13, 2023
1 parent 0fa22a6 commit 4d04c97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests.router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net/http"
"net/http/httptest"
"testing"
"time"

"github.com/julienschmidt/httprouter"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -96,7 +97,8 @@ func TestSetupBookRoutes(t *testing.T) {
}

bs := NewBookService(zap.NewNop(), nil, NewMockClocker(), mockRepo, mockRepo, mockQueue)
api := NewAPIHandler(zap.NewNop(), nil, &Statistics{started: NewMockClocker().Now()}, NewMockClocker(), NewMockUIDHandler("", true), bs)
api := NewAPIHandler(zap.NewNop(), &Config{}, &Statistics{started: NewMockClocker().Now()}, NewMockClocker(), NewMockUIDHandler("", true), bs)
api.config.Server.LongRequestWriteTimeout = time.Second
router := httprouter.New()
m := &MiddlewareMap{public: (&Middlewares{}).Chain, ops: (&Middlewares{}).Chain}
api.SetupBookRoutes(router, m)
Expand Down

0 comments on commit 4d04c97

Please sign in to comment.