Skip to content

Commit

Permalink
fixtest
Browse files Browse the repository at this point in the history
  • Loading branch information
reinkrul committed Jun 4, 2024
1 parent b1e1352 commit bf595ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions auth/api/iam/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"errors"
"fmt"
"github.com/nuts-foundation/nuts-node/http/user"
"github.com/nuts-foundation/nuts-node/test"
"net/http"
"net/http/httptest"
"net/url"
Expand Down Expand Up @@ -806,8 +807,11 @@ func TestWrapper_Routes(t *testing.T) {
router.EXPECT().GET(gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes()
router.EXPECT().POST(gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes()

authServices := auth.NewMockAuthenticationServices(ctrl)
authServices.EXPECT().PublicURL().Return(test.MustParseURL("https://example.com"))
(&Wrapper{
storageEngine: storage.NewTestStorageEngine(t),
auth: authServices,
}).Routes(router)
})
t.Run("cache middleware URLs match registered paths", func(t *testing.T) {
Expand All @@ -824,8 +828,11 @@ func TestWrapper_Routes(t *testing.T) {
return nil
}).AnyTimes()
router.EXPECT().Use(gomock.Any()).AnyTimes()
authServices := auth.NewMockAuthenticationServices(ctrl)
authServices.EXPECT().PublicURL().Return(test.MustParseURL("https://example.com"))
(&Wrapper{
storageEngine: storage.NewTestStorageEngine(t),
auth: authServices,
}).Routes(router)

// Check that all cache-control max-age paths are actual paths
Expand Down

0 comments on commit bf595ba

Please sign in to comment.