Adding content-header to api endpoints

This commit is contained in:
Daniel Alan Miller 2019-06-26 01:44:03 +10:00 committed by Traefiker Bot
parent e7e268b3bd
commit 53779d6ceb
2 changed files with 21 additions and 0 deletions

View file

@ -326,6 +326,8 @@ func TestHandlerTCP_API(t *testing.T) {
return
}
assert.Equal(t, resp.Header.Get("Content-Type"), "application/json")
contents, err := ioutil.ReadAll(resp.Body)
require.NoError(t, err)
@ -869,6 +871,7 @@ func TestHandlerHTTP_API(t *testing.T) {
return
}
assert.Equal(t, resp.Header.Get("Content-Type"), "application/json")
contents, err := ioutil.ReadAll(resp.Body)
require.NoError(t, err)
@ -1022,6 +1025,7 @@ func TestHandler_Configuration(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, test.expected.statusCode, resp.StatusCode)
assert.Equal(t, resp.Header.Get("Content-Type"), "application/json")
contents, err := ioutil.ReadAll(resp.Body)
require.NoError(t, err)