mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-17 16:11:01 -04:00
ab6c553e6b
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
18 lines
422 B
Go
18 lines
422 B
Go
package httputils // import "github.com/docker/docker/api/server/httputils"
|
|
|
|
import "testing"
|
|
|
|
// matchesContentType
|
|
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()
|
|
}
|
|
}
|