1
0
mirror of https://github.com/redis/go-redis.git synced 2025-04-17 20:17:02 +03:00

Merge pull request #469 from go-redis/fix/eval-test

Add Eval test.
This commit is contained in:
Vladimir Mihailenco 2017-01-03 12:33:37 +02:00 committed by GitHub
commit 67acf6e5a4

View File

@ -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 {