mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
4f0d95fa6e
Signed-off-by: Daniel Nephin <dnephin@docker.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()
|
|
}
|
|
}
|