testRouteNotOK2() — gin Function Reference
Architecture documentation for the testRouteNotOK2() function in routes_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD ec16dc06_f7e7_5002_96d6_845328485a07["testRouteNotOK2()"] 45929e18_70ca_7c55_01e0_596be99dd824["routes_test.go"] ec16dc06_f7e7_5002_96d6_845328485a07 -->|defined in| 45929e18_70ca_7c55_01e0_596be99dd824 3d267dbf_80ec_49cc_45a5_afeeb72b1b60["TestRouteNotOK2()"] 3d267dbf_80ec_49cc_45a5_afeeb72b1b60 -->|calls| ec16dc06_f7e7_5002_96d6_845328485a07 9785c910_0083_377a_37b6_92b299e0e32d["PerformRequest()"] ec16dc06_f7e7_5002_96d6_845328485a07 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d style ec16dc06_f7e7_5002_96d6_845328485a07 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
routes_test.go lines 69–87
func testRouteNotOK2(method string, t *testing.T) {
passed := false
router := New()
router.HandleMethodNotAllowed = true
var methodRoute string
if method == http.MethodPost {
methodRoute = http.MethodGet
} else {
methodRoute = http.MethodPost
}
router.Handle(methodRoute, "/test", func(c *Context) {
passed = true
})
w := PerformRequest(router, method, "/test")
assert.False(t, passed)
assert.Equal(t, http.StatusMethodNotAllowed, w.Code)
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does testRouteNotOK2() do?
testRouteNotOK2() is a function in the gin codebase, defined in routes_test.go.
Where is testRouteNotOK2() defined?
testRouteNotOK2() is defined in routes_test.go at line 69.
What does testRouteNotOK2() call?
testRouteNotOK2() calls 1 function(s): PerformRequest.
What calls testRouteNotOK2()?
testRouteNotOK2() is called by 1 function(s): TestRouteNotOK2.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free