mirror of
https://github.com/gin-gonic/gin.git
synced 2025-05-22 12:19:16 +08:00
minor fixes
This commit is contained in:
parent
6ee7307a73
commit
c1fa092ad1
@ -744,7 +744,7 @@ func TestBindingBSON(t *testing.T) {
|
|||||||
testBodyBinding(t,
|
testBodyBinding(t,
|
||||||
BSON, "bson",
|
BSON, "bson",
|
||||||
"/", "/",
|
"/", "/",
|
||||||
string(data), string(data[1:]))
|
string(data), string(data[1:])) //note: for badbody, we remove first byte
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestValidationFails(t *testing.T) {
|
func TestValidationFails(t *testing.T) {
|
||||||
|
@ -371,7 +371,7 @@ func TestRenderBSON(t *testing.T) {
|
|||||||
err = (BSON{data}).Render(w)
|
err = (BSON{data}).Render(w)
|
||||||
|
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
assert.Equal(t, string(bsonData), w.Body.String())
|
assert.Equal(t, bsonData, w.Body.Bytes())
|
||||||
assert.Equal(t, "application/bson", w.Header().Get("Content-Type"))
|
assert.Equal(t, "application/bson", w.Header().Get("Content-Type"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user