Home / Function/ TestDELETE() — gin Function Reference

TestDELETE() — gin Function Reference

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

Entity Profile

Relationship Graph

Source Code

ginS/gins_test.go lines 60–71

func TestDELETE(t *testing.T) {
	DELETE("/delete", func(c *gin.Context) {
		c.String(http.StatusOK, "deleted")
	})

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

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

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free