MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / testGetCookie

Function testGetCookie

pkg/web/cookie/cookie_test.go:50–62  ·  view source on GitHub ↗
(t *testing.T, value string, exists bool)

Source from the content-addressed store, hash-verified

48}
49
50func 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
64func testDeleteCookie() http.HandlerFunc {
65 return func(w http.ResponseWriter, r *http.Request) {

Callers 1

TestCookieFunction · 0.85

Calls 3

ExistsMethod · 0.80
NewMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected