Home / Function/ TestValidationFails() — gin Function Reference

TestValidationFails() — gin Function Reference

Architecture documentation for the TestValidationFails() function in binding_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  b8043679_bf8a_0715_fe40_32565eb885fe["TestValidationFails()"]
  2899e942_a23d_574e_8d47_d28e895c2604["requestWithBody()"]
  b8043679_bf8a_0715_fe40_32565eb885fe -->|calls| 2899e942_a23d_574e_8d47_d28e895c2604
  style b8043679_bf8a_0715_fe40_32565eb885fe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

binding/binding_test.go lines 750–755

func TestValidationFails(t *testing.T) {
	var obj FooStruct
	req := requestWithBody(http.MethodPost, "/", `{"bar": "foo"}`)
	err := JSON.Bind(req, &obj)
	require.Error(t, err)
}

Domain

Subdomains

Frequently Asked Questions

What does TestValidationFails() do?
TestValidationFails() is a function in the gin codebase.
What does TestValidationFails() call?
TestValidationFails() calls 1 function(s): requestWithBody.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free