a5efa69750
Signed-off-by: Kristina Zabunova <triara.xiii@gmail.com> (cherry picked from commit c3f1b2a5bd4a4330bcbad401c316af90925b99ad)
13 lines
277 B
Go
13 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")
|
|
}
|
|
}
|