mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
update dependencies
This commit is contained in:
38
vendor/github.com/gin-contrib/sessions/redis/redis_test.go
generated
vendored
Normal file
38
vendor/github.com/gin-contrib/sessions/redis/redis_test.go
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
package redis
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gin-contrib/sessions"
|
||||
"github.com/gin-contrib/sessions/tester"
|
||||
)
|
||||
|
||||
const redisTestServer = "localhost:6379"
|
||||
|
||||
var newRedisStore = func(_ *testing.T) sessions.Store {
|
||||
store, err := NewStore(10, "tcp", redisTestServer, "", []byte("secret"))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return store
|
||||
}
|
||||
|
||||
func TestRedis_SessionGetSet(t *testing.T) {
|
||||
tester.GetSet(t, newRedisStore)
|
||||
}
|
||||
|
||||
func TestRedis_SessionDeleteKey(t *testing.T) {
|
||||
tester.DeleteKey(t, newRedisStore)
|
||||
}
|
||||
|
||||
func TestRedis_SessionFlashes(t *testing.T) {
|
||||
tester.Flashes(t, newRedisStore)
|
||||
}
|
||||
|
||||
func TestRedis_SessionClear(t *testing.T) {
|
||||
tester.Clear(t, newRedisStore)
|
||||
}
|
||||
|
||||
func TestRedis_SessionOptions(t *testing.T) {
|
||||
tester.Options(t, newRedisStore)
|
||||
}
|
Reference in New Issue
Block a user