зеркало из https://github.com/microsoft/docker.git
20 строки
344 B
Go
20 строки
344 B
Go
|
package docker
|
||
|
|
||
|
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()
|
||
|
}
|
||
|
}
|