mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fixed TestGetInfoForBytes to work on all platforms (#3832)
This commit is contained in:
committed by
Joram Wilander
parent
e5a3e55737
commit
ac7ead09e2
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user