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

Function TestMappingCustomArrayUri

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

Source from the content-addressed store, hash-verified

690}
691
692func TestMappingCustomArrayUri(t *testing.T) {
693 var s struct {
694 FileData objectID `uri:"id"`
695 }
696 val := `664a062ac74a8ad104e0e80f`
697 err := mappingByPtr(&s, formSource{"id": {val}}, "uri")
698 require.NoError(t, err)
699
700 expected, _ := convertTo(val)
701 assert.Equal(t, expected, s.FileData)
702}
703
704func TestMappingCustomArrayForm(t *testing.T) {
705 var s struct {

Callers

nothing calls this directly

Calls 2

mappingByPtrFunction · 0.85
convertToFunction · 0.85

Tested by

no test coverage detected