From 7eeb6810769099c2d54bc6add982357a9206b57c Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Tue, 3 Jan 2017 12:21:22 +0200 Subject: [PATCH] Add Eval test. --- commands_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/commands_test.go b/commands_test.go index 226300e8..caa2e35e 100644 --- a/commands_test.go +++ b/commands_test.go @@ -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 {