diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-08-18 14:23:07 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-08-18 14:23:07 -0400 |
commit | ac7ead09e2013aeeb81445ddecaa6721b6cc91af (patch) | |
tree | 2ad647f9b74cbd69cb7ca30600a3136ff2dafe21 /model | |
parent | e5a3e557376363042bbaf9923fca0d57fb6b8b3a (diff) | |
download | chat-ac7ead09e2013aeeb81445ddecaa6721b6cc91af.tar.gz chat-ac7ead09e2013aeeb81445ddecaa6721b6cc91af.tar.bz2 chat-ac7ead09e2013aeeb81445ddecaa6721b6cc91af.zip |
Fixed TestGetInfoForBytes to work on all platforms (#3832)
Diffstat (limited to 'model')
-rw-r--r-- | model/file_info_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/model/file_info_test.go b/model/file_info_test.go index 7003d1e83..90256aed7 100644 --- a/model/file_info_test.go +++ b/model/file_info_test.go @@ -6,6 +6,7 @@ package model import ( "encoding/base64" "io/ioutil" + "strings" "testing" ) @@ -20,7 +21,7 @@ func TestGetInfoForBytes(t *testing.T) { t.Fatalf("Got incorrect size: %v", info.Size) } else if info.Extension != "txt" { t.Fatalf("Got incorrect file extension: %v", info.Extension) - } else if info.MimeType != "text/plain; charset=utf-8" { + } else if !strings.HasPrefix(info.MimeType, "text/plain") { t.Fatalf("Got incorrect mime type: %v", info.MimeType) } else if info.HasPreviewImage { t.Fatalf("Got HasPreviewImage = true for non-image file") |