From 819ab451f1806db640698f8e0513a7269f32c307 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 17 Oct 2018 09:04:15 -0700 Subject: Fix handlers test. (#9682) --- web/handlers_test.go | 5 ++--- 1 file 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=") } -- cgit v1.2.3-1-g7c22