Home / Function/ TestGroup() — gin Function Reference

TestGroup() — gin Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  9afa0c5f_7f3d_48d8_e080_a4f96eb5eb01["TestGroup()"]
  79139b72_4aa3_e743_29b2_537065ba4bec["gins_test.go"]
  9afa0c5f_7f3d_48d8_e080_a4f96eb5eb01 -->|defined in| 79139b72_4aa3_e743_29b2_537065ba4bec
  style 9afa0c5f_7f3d_48d8_e080_a4f96eb5eb01 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

ginS/gins_test.go lines 137–149

func TestGroup(t *testing.T) {
	group := Group("/group")
	group.GET("/test", func(c *gin.Context) {
		c.String(http.StatusOK, "group test")
	})

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

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

Subdomains

Defined In

Frequently Asked Questions

What does TestGroup() do?
TestGroup() is a function in the gin codebase, defined in ginS/gins_test.go.
Where is TestGroup() defined?
TestGroup() is defined in ginS/gins_test.go at line 137.

Analyze Your Own Codebase

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

Try Supermodel Free