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

Function TestBindingFormMultipart

binding/binding_test.go:687–695  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

685}
686
687func TestBindingFormMultipart(t *testing.T) {
688 req := createFormMultipartRequest(t)
689 var obj FooBarStruct
690 require.NoError(t, FormMultipart.Bind(req, &obj))
691
692 assert.Equal(t, "multipart/form-data", FormMultipart.Name())
693 assert.Equal(t, "bar", obj.Foo)
694 assert.Equal(t, "foo", obj.Bar)
695}
696
697func TestBindingFormMultipartForMap(t *testing.T) {
698 req := createFormMultipartRequestForMap(t)

Callers

nothing calls this directly

Calls 3

BindMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected