Home / Function/ TestContextSetCookiePathEmpty() — gin Function Reference

TestContextSetCookiePathEmpty() — gin Function Reference

Architecture documentation for the TestContextSetCookiePathEmpty() function in context_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  fe45ee3c_8a99_9fa9_9430_51eec6d9125c["TestContextSetCookiePathEmpty()"]
  ebe0ae48_a62b_a38f_5bac_5bbbd96fc508["context_test.go"]
  fe45ee3c_8a99_9fa9_9430_51eec6d9125c -->|defined in| ebe0ae48_a62b_a38f_5bac_5bbbd96fc508
  style fe45ee3c_8a99_9fa9_9430_51eec6d9125c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

context_test.go lines 1015–1020

func TestContextSetCookiePathEmpty(t *testing.T) {
	c, _ := CreateTestContext(httptest.NewRecorder())
	c.SetSameSite(http.SameSiteLaxMode)
	c.SetCookie("user", "gin", 1, "", "localhost", true, true)
	assert.Equal(t, "user=gin; Path=/; Domain=localhost; Max-Age=1; HttpOnly; Secure; SameSite=Lax", c.Writer.Header().Get("Set-Cookie"))
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does TestContextSetCookiePathEmpty() do?
TestContextSetCookiePathEmpty() is a function in the gin codebase, defined in context_test.go.
Where is TestContextSetCookiePathEmpty() defined?
TestContextSetCookiePathEmpty() is defined in context_test.go at line 1015.

Analyze Your Own Codebase

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

Try Supermodel Free