mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
565aa41392
- DisplayablePorts is a `cli` function, moving to `docker/cli` - Move MatchesContentType to the only package using it, `api/server/httputils` (and remove the deps on logrus for `api` package) Signed-off-by: Vincent Demeester <vincent@sbr.pm>
18 lines
364 B
Go
18 lines
364 B
Go
package 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()
|
|
}
|
|
}
|