diff options
-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") |