Home / Function/ TestAny() — gin Function Reference

TestAny() — gin Function Reference

Architecture documentation for the TestAny() function in gins_test.go from the gin codebase.

Entity Profile

Relationship Graph

Source Code

ginS/gins_test.go lines 111–122

func TestAny(t *testing.T) {
	Any("/any", func(c *gin.Context) {
		c.String(http.StatusOK, "any")
	})

	req := httptest.NewRequest(http.MethodGet, "/any", nil)
	w := httptest.NewRecorder()
	engine().ServeHTTP(w, req)

	assert.Equal(t, http.StatusOK, w.Code)
	assert.Equal(t, "any", w.Body.String())
}

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free