mirror of
https://github.com/gin-gonic/gin.git
synced 2025-05-21 09:26:17 +08:00
* ignore IntelliJ idea generated files * update JSON renderer to use Marshall() instead of Encode(). Fix #2209 * Revert "ignore IntelliJ idea generated files" This reverts commit e7bd017227df5dbd2ed2f5fe353adb5f1b08c678. Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-authored-by: thinkerou <thinkerou@gmail.com>
This commit is contained in:

committed by
GitHub

parent
863ad2d4de
commit
5f56109bcf
@ -36,7 +36,7 @@ func TestRenderJSON(t *testing.T) {
|
||||
err := (JSON{data}).Render(w)
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "{\"foo\":\"bar\",\"html\":\"\\u003cb\\u003e\"}\n", w.Body.String())
|
||||
assert.Equal(t, "{\"foo\":\"bar\",\"html\":\"\\u003cb\\u003e\"}", w.Body.String())
|
||||
assert.Equal(t, "application/json; charset=utf-8", w.Header().Get("Content-Type"))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user