add more tests for stores (#446)

This commit is contained in:
Kevin Wan
2021-02-07 17:22:47 +08:00
committed by GitHub
parent 852891dbd8
commit 745e76c335
3 changed files with 43 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
package redis
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestScriptCache(t *testing.T) {
cache := GetScriptCache()
cache.SetSha("foo", "bar")
cache.SetSha("bla", "blabla")
bar, ok := cache.GetSha("foo")
assert.True(t, ok)
assert.Equal(t, "bar", bar)
}