Skip to content

Commit 922048f

Browse files
committed
fix: test content-type (resolve: discussion_r1936938314)
1 parent 90bc8c2 commit 922048f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

request_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ func Test_ParseRequest(t *testing.T) {
115115
// Check ProblemDetails if an error was expected.
116116
if tt.wantDetail != nil {
117117
rec := w.(*httptest.ResponseRecorder)
118+
assert.Equal(t, "application/problem+json; charset=utf-8", rec.Header().Get("Content-Type"), "Content-Type header mismatch")
118119
var pd ProblemDetails
119120
decodeErr := json.NewDecoder(rec.Body).Decode(&pd)
120121
assert.NoError(t, decodeErr, "Failed to decode problem details response")

0 commit comments

Comments
 (0)