diff options
Diffstat (limited to 'internal/urilimiter/urilimiter_test.go')
-rw-r--r-- | internal/urilimiter/urilimiter_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/urilimiter/urilimiter_test.go b/internal/urilimiter/urilimiter_test.go index 0ac89ea0..a314ec91 100644 --- a/internal/urilimiter/urilimiter_test.go +++ b/internal/urilimiter/urilimiter_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitlab-pages/internal/testhelpers" ) func TestNewMiddleware(t *testing.T) { @@ -56,7 +57,7 @@ func TestNewMiddleware(t *testing.T) { middleware.ServeHTTP(ww, rr) res := ww.Result() - defer res.Body.Close() + testhelpers.Close(t, res.Body) require.Equal(t, tt.expectedStatus, res.StatusCode) if tt.expectedStatus == http.StatusOK { |