1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Fixed .multi() to convert HGETALL result to an object

This commit is contained in:
Aivo Paas
2010-10-02 22:00:57 +03:00
parent 8356ecfda8
commit 3495b60047
2 changed files with 33 additions and 5 deletions

15
test.js
View File

@@ -183,6 +183,21 @@ tests.MULTI_5 = function () {
});
};
tests.MULTI_6 = function () {
var name = "MULTI_6";
client.multi()
.hmset("multihash", "a", "foo", "b", 1)
.hgetall("multihash")
.exec(function (err, replies){
assert.strictEqual(null, err);
assert.equal("OK", replies[0]);
assert.equal(Object.keys(replies[1]).length, 2);
assert.equal("foo", replies[1].a.toString());
assert.equal("1", replies[1].b.toString());
next(name);
});
};
tests.HMGET = function () {
var key = "test hash", name = "HMGET";