more robust command response content-type checking (#7412)

Этот коммит содержится в:
Chris
2017-09-11 10:09:24 -05:00
коммит произвёл GitHub
родитель 402491b7e5
Коммит 674a606bd0
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@@ -27,6 +27,7 @@ func TestCommandResponseFromHTTPBody(t *testing.T) {
{"", "foo", "foo"},
{"text/plain", "foo", "foo"},
{"application/json", `{"text": "foo"}`, "foo"},
{"application/json; charset=utf-8", `{"text": "foo"}`, "foo"},
} {
response := CommandResponseFromHTTPBody(test.ContentType, strings.NewReader(test.Body))
if response.Text != test.ExpectedText {