github.com/alok87/docker@v1.6.0/api/api_unit_test.go (about) 1 package api 2 3 import ( 4 "testing" 5 ) 6 7 func TestJsonContentType(t *testing.T) { 8 if !MatchesContentType("application/json", "application/json") { 9 t.Fail() 10 } 11 12 if !MatchesContentType("application/json; charset=utf-8", "application/json") { 13 t.Fail() 14 } 15 16 if MatchesContentType("dockerapplication/json", "application/json") { 17 t.Fail() 18 } 19 }