diff options
Diffstat (limited to 'web/handlers_test.go')
-rw-r--r-- | web/handlers_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/web/handlers_test.go b/web/handlers_test.go index 6b68a9987..2756e143e 100644 --- a/web/handlers_test.go +++ b/web/handlers_test.go @@ -33,8 +33,7 @@ func TestHandlerServeHTTPErrors(t *testing.T) { mobile bool redirect bool }{ - // TODO: Fixme for go1.11 - //{"redirect on destkop non-api endpoint", "/login/sso/saml", false, true}, + {"redirect on destkop non-api endpoint", "/login/sso/saml", false, true}, {"not redirect on destkop api endpoint", "/api/v4/test", false, false}, {"not redirect on mobile non-api endpoint", "/login/sso/saml", true, false}, {"not redirect on mobile api endpoint", "/api/v4/test", true, false}, @@ -50,7 +49,7 @@ func TestHandlerServeHTTPErrors(t *testing.T) { handler.ServeHTTP(response, request) if tt.redirect { - assert.Contains(t, response.Body.String(), "/error?message=") + assert.Equal(t, response.Code, http.StatusFound) } else { assert.NotContains(t, response.Body.String(), "/error?message=") } |