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

Function TestBindingDefaultValueFormPost

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

Source from the content-addressed store, hash-verified

632}
633
634func TestBindingDefaultValueFormPost(t *testing.T) {
635 req := createDefaultFormPostRequest(t)
636 var obj FooDefaultBarStruct
637 require.NoError(t, FormPost.Bind(req, &obj))
638
639 assert.Equal(t, "bar", obj.Foo)
640 assert.Equal(t, "hello", obj.Bar)
641}
642
643func TestBindingFormPostForMap(t *testing.T) {
644 req := createFormPostRequestForMap(t)

Callers

nothing calls this directly

Calls 2

BindMethod · 0.65

Tested by

no test coverage detected