@@ -154,7 +154,7 @@ func TestContextJSON(t *testing.T) {
154
154
err := c .JSON (http .StatusOK , user {1 , "Jon Snow" })
155
155
if assert .NoError (t , err ) {
156
156
assert .Equal (t , http .StatusOK , rec .Code )
157
- assert .Equal (t , MIMEApplicationJSONCharsetUTF8 , rec .Header ().Get (HeaderContentType ))
157
+ assert .Equal (t , MIMEApplicationJSON , rec .Header ().Get (HeaderContentType ))
158
158
assert .Equal (t , userJSON + "\n " , rec .Body .String ())
159
159
}
160
160
}
@@ -178,7 +178,7 @@ func TestContextJSONPrettyURL(t *testing.T) {
178
178
err := c .JSON (http .StatusOK , user {1 , "Jon Snow" })
179
179
if assert .NoError (t , err ) {
180
180
assert .Equal (t , http .StatusOK , rec .Code )
181
- assert .Equal (t , MIMEApplicationJSONCharsetUTF8 , rec .Header ().Get (HeaderContentType ))
181
+ assert .Equal (t , MIMEApplicationJSON , rec .Header ().Get (HeaderContentType ))
182
182
assert .Equal (t , userJSONPretty + "\n " , rec .Body .String ())
183
183
}
184
184
}
@@ -192,7 +192,7 @@ func TestContextJSONPretty(t *testing.T) {
192
192
err := c .JSONPretty (http .StatusOK , user {1 , "Jon Snow" }, " " )
193
193
if assert .NoError (t , err ) {
194
194
assert .Equal (t , http .StatusOK , rec .Code )
195
- assert .Equal (t , MIMEApplicationJSONCharsetUTF8 , rec .Header ().Get (HeaderContentType ))
195
+ assert .Equal (t , MIMEApplicationJSON , rec .Header ().Get (HeaderContentType ))
196
196
assert .Equal (t , userJSONPretty + "\n " , rec .Body .String ())
197
197
}
198
198
}
@@ -213,7 +213,7 @@ func TestContextJSONWithEmptyIntent(t *testing.T) {
213
213
err := c .json (http .StatusOK , user {1 , "Jon Snow" }, emptyIndent )
214
214
if assert .NoError (t , err ) {
215
215
assert .Equal (t , http .StatusOK , rec .Code )
216
- assert .Equal (t , MIMEApplicationJSONCharsetUTF8 , rec .Header ().Get (HeaderContentType ))
216
+ assert .Equal (t , MIMEApplicationJSON , rec .Header ().Get (HeaderContentType ))
217
217
assert .Equal (t , buf .String (), rec .Body .String ())
218
218
}
219
219
}
@@ -244,7 +244,7 @@ func TestContextJSONBlob(t *testing.T) {
244
244
err = c .JSONBlob (http .StatusOK , data )
245
245
if assert .NoError (t , err ) {
246
246
assert .Equal (t , http .StatusOK , rec .Code )
247
- assert .Equal (t , MIMEApplicationJSONCharsetUTF8 , rec .Header ().Get (HeaderContentType ))
247
+ assert .Equal (t , MIMEApplicationJSON , rec .Header ().Get (HeaderContentType ))
248
248
assert .Equal (t , userJSON , rec .Body .String ())
249
249
}
250
250
}
@@ -533,7 +533,7 @@ func TestContext_JSON_CommitsCustomResponseCode(t *testing.T) {
533
533
534
534
if assert .NoError (t , err ) {
535
535
assert .Equal (t , http .StatusCreated , rec .Code )
536
- assert .Equal (t , MIMEApplicationJSONCharsetUTF8 , rec .Header ().Get (HeaderContentType ))
536
+ assert .Equal (t , MIMEApplicationJSON , rec .Header ().Get (HeaderContentType ))
537
537
assert .Equal (t , userJSON + "\n " , rec .Body .String ())
538
538
}
539
539
}
0 commit comments