Adding content-header to api endpoints
This commit is contained in:
parent
e7e268b3bd
commit
53779d6ceb
2 changed files with 21 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue