Пример #1
0
func TestCookie(t *testing.T) {
	cookie := &Cookie{&http.Cookie{
		Name:     "session",
		Value:    "securetoken",
		Path:     "/",
		Domain:   "github.com",
		Expires:  time.Date(2016, time.January, 1, 0, 0, 0, 0, time.UTC),
		Secure:   true,
		HttpOnly: true,
	}}
	test.CookieTest(t, cookie)
}
Пример #2
0
func TestCookie(t *testing.T) {
	fCookie := &fast.Cookie{}
	fCookie.SetKey("session")
	fCookie.SetValue("securetoken")
	fCookie.SetPath("/")
	fCookie.SetDomain("github.com")
	fCookie.SetExpire(time.Date(2016, time.January, 1, 0, 0, 0, 0, time.UTC))
	fCookie.SetSecure(true)
	fCookie.SetHTTPOnly(true)

	cookie := &Cookie{
		fCookie,
	}
	test.CookieTest(t, cookie)
}