2014-01-29 19:26:54 +00:00
|
|
|
package api
|
2013-11-14 06:08:08 +00:00
|
|
|
|
|
|
|
import (
|
2013-11-14 06:11:28 +00:00
|
|
|
"testing"
|
2013-11-14 06:08:08 +00:00
|
|
|
)
|
|
|
|
|
2014-01-29 19:26:54 +00:00
|
|
|
func TestJsonContentType(t *testing.T) {
|
|
|
|
if !MatchesContentType("application/json", "application/json") {
|
|
|
|
t.Fail()
|
|
|
|
}
|
|
|
|
|
|
|
|
if !MatchesContentType("application/json; charset=utf-8", "application/json") {
|
|
|
|
t.Fail()
|
|
|
|
}
|
|
|
|
|
|
|
|
if MatchesContentType("dockerapplication/json", "application/json") {
|
|
|
|
t.Fail()
|
|
|
|
}
|
|
|
|
}
|