mirror of https://github.com/go-redis/redis.git
Add Eval test.
This commit is contained in:
parent
8fcba2ea87
commit
7eeb681076
|
@ -2852,6 +2852,20 @@ var _ = Describe("Commands", func() {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Describe("Eval", func() {
|
||||||
|
|
||||||
|
It("returns keys and values", func() {
|
||||||
|
vals, err := client.Eval(
|
||||||
|
"return {KEYS[1],ARGV[1]}",
|
||||||
|
[]string{"key"},
|
||||||
|
"hello",
|
||||||
|
).Result()
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
Expect(vals).To(Equal([]interface{}{"key", "hello"}))
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
type numberStruct struct {
|
type numberStruct struct {
|
||||||
|
|
Loading…
Reference in New Issue