Skip to content

Commit

Permalink
Fix exported test function
Browse files Browse the repository at this point in the history
  • Loading branch information
javierprovecho committed Oct 2, 2015
1 parent 4892650 commit fe49f0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,14 @@ func TestContextPostFormMultipart(t *testing.T) {
}

func TestContextSetCookie(t *testing.T) {
c, _, _ := createTestContext()
c, _, _ := CreateTestContext()
c.SetCookie("user", "gin", 1, "/", "localhost", true, true)
c.Request, _ = http.NewRequest("GET", "/set", nil)
assert.Equal(t, c.Writer.Header().Get("Set-Cookie"), "user=gin; Path=/; Domain=localhost; Max-Age=1; HttpOnly; Secure")
}

func TestContextGetCookie(t *testing.T) {
c, _, _ := createTestContext()
c, _, _ := CreateTestContext()
c.Request, _ = http.NewRequest("GET", "/get", nil)
c.Request.Header.Set("Cookie", "user=gin")
cookie, _ := c.GetCookie("user")
Expand Down

0 comments on commit fe49f0b

Please sign in to comment.