mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
185b040e49
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
19 lines
341 B
Go
19 lines
341 B
Go
package api
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
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()
|
|
}
|
|
}
|