moby--moby/pkg/httputils/mimetype_test.go

14 lines
277 B
Go

package httputils
import (
"testing"
)
func TestDetectContentType(t *testing.T) {
input := []byte("That is just a plain text")
if contentType, _, err := DetectContentType(input); err != nil || contentType != "text/plain" {
t.Errorf("TestDetectContentType failed")
}
}