mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-24 19:09:57 +08:00
fix(test): add space between key and value as same as standard JSON.
This commit is contained in:
parent
10a35af400
commit
bf96593ff5
@ -582,7 +582,7 @@ func TestContextRenderIndentedJSON(t *testing.T) {
|
|||||||
c.IndentedJSON(201, H{"foo": "bar", "bar": "foo", "nested": H{"foo": "bar"}})
|
c.IndentedJSON(201, H{"foo": "bar", "bar": "foo", "nested": H{"foo": "bar"}})
|
||||||
|
|
||||||
assert.Equal(t, w.Code, 201)
|
assert.Equal(t, w.Code, 201)
|
||||||
assert.Equal(t, "{\n \"bar\":\"foo\",\n \"foo\":\"bar\",\n \"nested\":{\n \"foo\":\"bar\"\n }\n}", w.Body.String())
|
assert.Equal(t, "{\n \"bar\": \"foo\",\n \"foo\": \"bar\",\n \"nested\":{\n \"foo\": \"bar\"\n }\n}", w.Body.String())
|
||||||
assert.Equal(t, "application/json; charset=utf-8", w.HeaderMap.Get("Content-Type"))
|
assert.Equal(t, "application/json; charset=utf-8", w.HeaderMap.Get("Content-Type"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user