pkg/httputils/mimetype_test.go
Kristina Zabunova 46454090b6 Increased test coverage of httputils to 70 %
Signed-off-by: Kristina Zabunova <triara.xiii@gmail.com>
(cherry picked from commit d71817464e859cd323d6cdaf4dec5a9dd530f57e)
2015-08-28 10:41:19 -04:00

14 lines
277 B
Go

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