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.
17 lines
283 B
Go
17 lines
283 B
Go
4 years ago
|
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)
|
||
|
}
|