diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-10-17 09:04:15 -0700 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2018-10-17 12:04:15 -0400 |
commit | 819ab451f1806db640698f8e0513a7269f32c307 (patch) | |
tree | fe1716e0e9b10268adc1f6a222644ddbcf287e9c /web | |
parent | 715097cc76510a3d78ba83e8544ee7c956ed26e9 (diff) | |
download | chat-819ab451f1806db640698f8e0513a7269f32c307.tar.gz chat-819ab451f1806db640698f8e0513a7269f32c307.tar.bz2 chat-819ab451f1806db640698f8e0513a7269f32c307.zip |
Fix handlers test. (#9682)
Diffstat (limited to 'web')
-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=") } |