MCPcopy
hub / github.com/gin-gonic/gin / TestMappingCustomArrayForm

Function TestMappingCustomArrayForm

binding/form_mapping_test.go:704–714  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

702}
703
704func TestMappingCustomArrayForm(t *testing.T) {
705 var s struct {
706 FileData objectID `form:"id"`
707 }
708 val := `664a062ac74a8ad104e0e80f`
709 err := mappingByPtr(&s, formSource{"id": {val}}, "form")
710 require.NoError(t, err)
711
712 expected, _ := convertTo(val)
713 assert.Equal(t, expected, s.FileData)
714}
715
716func TestMappingCustomArrayOfArrayUri(t *testing.T) {
717 id1, _ := convertTo(`664a062ac74a8ad104e0e80e`)

Callers

nothing calls this directly

Calls 2

mappingByPtrFunction · 0.85
convertToFunction · 0.85

Tested by

no test coverage detected