mirror of https://github.com/gin-gonic/gin.git
Compare commits
4 Commits
151129d1b1
...
5776d48f2f
Author | SHA1 | Date |
---|---|---|
Tim | 5776d48f2f | |
TimAndy | 525e4354a4 | |
TimAndy | 8363db7e38 | |
TimAndy | 672d629c23 |
|
@ -58,7 +58,7 @@ func TestCustomJsonCodec(t *testing.T) {
|
|||
//test encode json
|
||||
w := httptest.NewRecorder()
|
||||
err2 := (render.PureJSON{Data: obj}).Render(w)
|
||||
assert.NoError(t, err2)
|
||||
require.NoError(t, err2)
|
||||
assert.Equal(t, "{\"time_empty\":null,\"time_struct\":\"2001-12-05 10:01:02.345\",\"time_nil\":null,\"time_pointer\":\"2002-12-05 10:01:02.345\"}\n", w.Body.String())
|
||||
assert.Equal(t, "application/json; charset=utf-8", w.Header().Get("Content-Type"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue