From ac7ead09e2013aeeb81445ddecaa6721b6cc91af Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Thu, 18 Aug 2016 14:23:07 -0400 Subject: Fixed TestGetInfoForBytes to work on all platforms (#3832) --- model/file_info_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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") -- cgit v1.2.3-1-g7c22