TestRouteNotAllowedDisabled() — gin Function Reference
Architecture documentation for the TestRouteNotAllowedDisabled() function in routes_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD 9c6701f2_8762_f5e3_f798_5b3e381c0194["TestRouteNotAllowedDisabled()"] 69c2add5_555a_3d82_a4e7_993886631a2c["PerformRequest()"] 9c6701f2_8762_f5e3_f798_5b3e381c0194 -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c style 9c6701f2_8762_f5e3_f798_5b3e381c0194 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
routes_test.go lines 530–543
func TestRouteNotAllowedDisabled(t *testing.T) {
router := New()
router.HandleMethodNotAllowed = false
router.POST("/path", func(c *Context) {})
w := PerformRequest(router, http.MethodGet, "/path")
assert.Equal(t, http.StatusNotFound, w.Code)
router.NoMethod(func(c *Context) {
c.String(http.StatusTeapot, "responseText")
})
w = PerformRequest(router, http.MethodGet, "/path")
assert.Equal(t, "404 page not found", w.Body.String())
assert.Equal(t, http.StatusNotFound, w.Code)
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does TestRouteNotAllowedDisabled() do?
TestRouteNotAllowedDisabled() is a function in the gin codebase.
What does TestRouteNotAllowedDisabled() call?
TestRouteNotAllowedDisabled() calls 1 function(s): PerformRequest.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free