TestContextRenderRedirectWith201() — gin Function Reference
Architecture documentation for the TestContextRenderRedirectWith201() function in context_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD 4a36c9d3_f063_1f77_d17c_cc8a938e5f44["TestContextRenderRedirectWith201()"] ebe0ae48_a62b_a38f_5bac_5bbbd96fc508["context_test.go"] 4a36c9d3_f063_1f77_d17c_cc8a938e5f44 -->|defined in| ebe0ae48_a62b_a38f_5bac_5bbbd96fc508 style 4a36c9d3_f063_1f77_d17c_cc8a938e5f44 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
context_test.go lines 1578–1588
func TestContextRenderRedirectWith201(t *testing.T) {
w := httptest.NewRecorder()
c, _ := CreateTestContext(w)
c.Request, _ = http.NewRequest(http.MethodPost, "http://example.com", nil)
c.Redirect(http.StatusCreated, "/resource")
c.Writer.WriteHeaderNow()
assert.Equal(t, http.StatusCreated, w.Code)
assert.Equal(t, "/resource", w.Header().Get("Location"))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does TestContextRenderRedirectWith201() do?
TestContextRenderRedirectWith201() is a function in the gin codebase, defined in context_test.go.
Where is TestContextRenderRedirectWith201() defined?
TestContextRenderRedirectWith201() is defined in context_test.go at line 1578.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free