Home / Function/ TestMethodNotAllowedNoRoute() — gin Function Reference

TestMethodNotAllowedNoRoute() — gin Function Reference

Architecture documentation for the TestMethodNotAllowedNoRoute() function in gin_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  bc791fed_0541_5519_1f75_54d7c3889147["TestMethodNotAllowedNoRoute()"]
  5d6e7276_feeb_b8e2_30e8_0ae0827740a5["gin_test.go"]
  bc791fed_0541_5519_1f75_54d7c3889147 -->|defined in| 5d6e7276_feeb_b8e2_30e8_0ae0827740a5
  style bc791fed_0541_5519_1f75_54d7c3889147 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

gin_test.go lines 979–987

func TestMethodNotAllowedNoRoute(t *testing.T) {
	g := New()
	g.HandleMethodNotAllowed = true

	req := httptest.NewRequest(http.MethodGet, "/", nil)
	resp := httptest.NewRecorder()
	assert.NotPanics(t, func() { g.ServeHTTP(resp, req) })
	assert.Equal(t, http.StatusNotFound, resp.Code)
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does TestMethodNotAllowedNoRoute() do?
TestMethodNotAllowedNoRoute() is a function in the gin codebase, defined in gin_test.go.
Where is TestMethodNotAllowedNoRoute() defined?
TestMethodNotAllowedNoRoute() is defined in gin_test.go at line 979.

Analyze Your Own Codebase

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

Try Supermodel Free