Increased test coverage of httputils to 70 %

Signed-off-by: Kristina Zabunova <triara.xiii@gmail.com>
(cherry picked from commit d71817464e859cd323d6cdaf4dec5a9dd530f57e)
This commit is contained in:
Kristina Zabunova 2015-06-30 10:49:00 -07:00 committed by David Calavera
parent 7e6418c6b1
commit 46454090b6
2 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,14 @@
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")
}
}