Home / Function/ TestRouteNotAllowedEnabled2() — gin Function Reference

TestRouteNotAllowedEnabled2() — gin Function Reference

Architecture documentation for the TestRouteNotAllowedEnabled2() function in routes_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  279fde85_2f64_15aa_4fc4_eff71c38e6e0["TestRouteNotAllowedEnabled2()"]
  69c2add5_555a_3d82_a4e7_993886631a2c["PerformRequest()"]
  279fde85_2f64_15aa_4fc4_eff71c38e6e0 -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  style 279fde85_2f64_15aa_4fc4_eff71c38e6e0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

routes_test.go lines 508–516

func TestRouteNotAllowedEnabled2(t *testing.T) {
	router := New()
	router.HandleMethodNotAllowed = true
	// add one methodTree to trees
	router.addRoute(http.MethodPost, "/", HandlersChain{func(_ *Context) {}})
	router.GET("/path2", func(c *Context) {})
	w := PerformRequest(router, http.MethodPost, "/path2")
	assert.Equal(t, http.StatusMethodNotAllowed, w.Code)
}

Domain

Subdomains

Frequently Asked Questions

What does TestRouteNotAllowedEnabled2() do?
TestRouteNotAllowedEnabled2() is a function in the gin codebase.
What does TestRouteNotAllowedEnabled2() call?
TestRouteNotAllowedEnabled2() 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