From bb221adec43ede66d38f4e37bb74ffb74591e398 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Mon, 14 Sep 2015 00:09:38 -0700 Subject: [PATCH] added test for multi.hmset's array handling --- test/commands/multi.spec.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/commands/multi.spec.js b/test/commands/multi.spec.js index 45c3ab3f1a..f7204ce14d 100644 --- a/test/commands/multi.spec.js +++ b/test/commands/multi.spec.js @@ -210,6 +210,19 @@ describe("The 'multi' method", function () { }); }); + it('allows an array to be provided to hmset', function (done) { + client.multi() + .hmset("arrayhash", ['a', 'b', 'c']) + .hgetall("arrayhash") + .exec(function (err, replies) { + assert.strictEqual(null, err); + assert.equal("OK", replies[0]); + assert.equal(Object.keys(replies[1]).length, 3); + assert.equal("b", replies[1]['1']); + return done(); + }); + }); + }); }); });