You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bathyscaphe/internal/cache/redis_test.go

16 lines
320 B
Go

package cache
import "testing"
func TestRedisCache_GetKey(t *testing.T) {
rc := redisCache{}
if got := rc.getKey("user"); got != "user" {
t.Errorf("got %s want %s", got, "user")
}
rc.keyPrefix = "config"
if got := rc.getKey("user"); got != "config:user" {
t.Errorf("got %s want %s", got, "config:user")
}
}