diff --git a/binding/form_mapping_test.go b/binding/form_mapping_test.go index c9d6111b..772ac144 100644 --- a/binding/form_mapping_test.go +++ b/binding/form_mapping_test.go @@ -260,6 +260,15 @@ func TestMappingStructField(t *testing.T) { assert.Equal(t, 9, s.J.I) } +func TestByteArray(t *testing.T) { + var s struct { + B []byte + } + err := mappingByPtr(&s, formSource{"B": {"hello"}}, "form") + assert.NoError(t, err) + assert.Equal(t, []byte("hello"), s.B) +} + func TestMappingMapField(t *testing.T) { var s struct { M map[string]int