diff options
author | Alex Moon <moonmeister@users.noreply.github.com> | 2017-09-21 18:20:20 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-09-21 18:20:20 -0700 |
commit | 7d23276b0cbf4ef5cb45cb20e2dc9f5eb13b3a63 (patch) | |
tree | 653a664c841e861a3c1041eb03edfbf91b6fa471 /web/web_test.go | |
parent | 265392fa480fb875ede98a5df7359a7dc5340667 (diff) | |
download | chat-7d23276b0cbf4ef5cb45cb20e2dc9f5eb13b3a63.tar.gz chat-7d23276b0cbf4ef5cb45cb20e2dc9f5eb13b3a63.tar.bz2 chat-7d23276b0cbf4ef5cb45cb20e2dc9f5eb13b3a63.zip |
Revert user_agent chanes made for PLT-959 #6945 to fix clients incorrectly being given incompaibile message (#7497)
Diffstat (limited to 'web/web_test.go')
-rw-r--r-- | web/web_test.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/web/web_test.go b/web/web_test.go index be3d3f309..2bf92151f 100644 --- a/web/web_test.go +++ b/web/web_test.go @@ -12,7 +12,6 @@ import ( "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/store" "github.com/mattermost/mattermost-server/utils" - "github.com/mssola/user_agent" ) var ApiClient *model.Client @@ -114,31 +113,3 @@ func TestIncomingWebhook(t *testing.T) { } } } - -func TestCheckBrowserCompatability(t *testing.T) { - - //test should fail browser compatibility check with Mozilla FF 40.1 - ua := "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1" - t.Logf("Checking Mozzila 40.1 with U.A. String: \n%v", ua) - if result := CheckBrowserCompatability(user_agent.New(ua)); result == true { - t.Error("Fail: should have failed browser compatibility") - } else { - t.Log("Pass: User Agent correctly failed!") - } - - ua = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36" - t.Logf("Checking Chrome 60 with U.A. String: \n%v", ua) - if result := CheckBrowserCompatability(user_agent.New(ua)); result == false { - t.Error("Fail: should have passed browser compatibility") - } else { - t.Log("Pass: User Agent correctly passed!") - } - - ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393" - t.Logf("Checking Edge 14.14393 with U.A. String: \n%v", ua) - if result := CheckBrowserCompatability(user_agent.New(ua)); result == true { - t.Log("Warning: Edge should have failed browser compatibility. It is probably still detecting as Chrome.") - } else { - t.Log("Pass: User Agent correctly failed!") - } -} |