graphql: test content-type

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
jsvisa 2023-10-26 08:32:45 +08:00
parent c0aec5a05f
commit 8243e3beb1

View file

@ -164,6 +164,9 @@ func TestGraphQLBlockSerialization(t *testing.T) {
if tt.code != resp.StatusCode {
t.Errorf("testcase %d %s,\nwrong statuscode, have: %v, want: %v", i, tt.body, resp.StatusCode, tt.code)
}
if ctype := resp.Header.Get("Content-Type"); ctype != "application/json" {
t.Errorf("testcase %d \nwrong Content-Type, have: %v, want: %v", i, ctype, "application/json")
}
}
}