File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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
750750func TestValidationFails (t * testing.T ) {
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments