You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
297 B

2 years ago
package captcha
import (
"fmt"
"github.com/go-redis/redis"
"testing"
)
func TestGenerateKey(t *testing.T) {
client := redis.NewClient(&redis.Options{})
store := NewRedisStore("user", client)
id, _, err := Generate(store)
fmt.Println(id, err)
fmt.Println(store.Verify(id, "aa", false))
}