...
1 package memstore
2
3 import (
4 "testing"
5
6 "github.com/gin-contrib/sessions"
7 "github.com/gin-contrib/sessions/tester"
8 )
9
10 var newStore = func(_ *testing.T) sessions.Store {
11 store := NewStore([]byte("secret"))
12 return store
13 }
14
15 func TestCookie_SessionGetSet(t *testing.T) {
16 tester.GetSet(t, newStore)
17 }
18
19 func TestCookie_SessionDeleteKey(t *testing.T) {
20 tester.DeleteKey(t, newStore)
21 }
22
23 func TestCookie_SessionFlashes(t *testing.T) {
24 tester.Flashes(t, newStore)
25 }
26
27 func TestCookie_SessionClear(t *testing.T) {
28 tester.Clear(t, newStore)
29 }
30
31 func TestCookie_SessionOptions(t *testing.T) {
32 tester.Options(t, newStore)
33 }
34
35 func TestCookie_SessionMany(t *testing.T) {
36 tester.Many(t, newStore)
37 }
38
View as plain text