From 8243e3beb122dce19b8f88b49ab060c96bbc305e Mon Sep 17 00:00:00 2001 From: jsvisa Date: Thu, 26 Oct 2023 08:32:45 +0800 Subject: [PATCH] graphql: test content-type Signed-off-by: jsvisa --- graphql/graphql_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/graphql/graphql_test.go b/graphql/graphql_test.go index 4bbfb7251d..b0ac5d3fd4 100644 --- a/graphql/graphql_test.go +++ b/graphql/graphql_test.go @@ -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") + } } }