(t *testing.T, value string, exists bool)
| 48 | } |
| 49 | |
| 50 | func testGetCookie(t *testing.T, value string, exists bool) http.HandlerFunc { |
| 51 | a := assertions.New(t) |
| 52 | return func(w http.ResponseWriter, r *http.Request) { |
| 53 | var v testCookieValue |
| 54 | ok, err := testCookieSettings.Get(w, r, &v) |
| 55 | a.So(err, should.BeNil) |
| 56 | a.So(ok, should.Equal, exists) |
| 57 | a.So(v.Value, should.Equal, value) |
| 58 | |
| 59 | present := testCookieSettings.Exists(r) |
| 60 | a.So(present, should.Equal, exists) |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | func testDeleteCookie() http.HandlerFunc { |
| 65 | return func(w http.ResponseWriter, r *http.Request) { |
no test coverage detected