Skip to content

Commit 27562a7

Browse files
committed
minor fixes
1 parent 6ee7307 commit 27562a7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

binding/binding_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ func TestBindingBSON(t *testing.T) {
744744
testBodyBinding(t,
745745
BSON, "bson",
746746
"/", "/",
747-
string(data), string(data[1:]))
747+
string(data), string(data[1:])) //note: for badbody, we remove first byte
748748
}
749749

750750
func TestValidationFails(t *testing.T) {

render/render_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ func TestRenderBSON(t *testing.T) {
359359
Label string
360360
Reps []int64
361361
}
362-
var data mystruct = mystruct{
362+
var data = mystruct{
363363
Label: "test",
364364
Reps: []int64{int64(1), int64(2)}}
365365

@@ -371,7 +371,7 @@ func TestRenderBSON(t *testing.T) {
371371
err = (BSON{data}).Render(w)
372372

373373
require.NoError(t, err)
374-
assert.Equal(t, string(bsonData), w.Body.String())
374+
assert.Equal(t, bsonData, w.Body.Bytes())
375375
assert.Equal(t, "application/bson", w.Header().Get("Content-Type"))
376376
}
377377

0 commit comments

Comments
 (0)