Skip to content

Commit bb221ad

Browse files
author
Benjamin Coe
committed
added test for multi.hmset's array handling
1 parent be70890 commit bb221ad

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/commands/multi.spec.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,19 @@ describe("The 'multi' method", function () {
210210
});
211211
});
212212

213+
it('allows an array to be provided to hmset', function (done) {
214+
client.multi()
215+
.hmset("arrayhash", ['a', 'b', 'c'])
216+
.hgetall("arrayhash")
217+
.exec(function (err, replies) {
218+
assert.strictEqual(null, err);
219+
assert.equal("OK", replies[0]);
220+
assert.equal(Object.keys(replies[1]).length, 3);
221+
assert.equal("b", replies[1]['1']);
222+
return done();
223+
});
224+
});
225+
213226
});
214227
});
215228
});

0 commit comments

Comments
 (0)