1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Issue #439 (and others): Stop assuming all "message" or "pmessage" replies are pubsub replies. Check pub_sub_mode as well.

This commit is contained in:
Bryce Baril
2013-10-02 14:04:28 -07:00
parent 520ed070d6
commit 5f125b51d4
3 changed files with 22 additions and 1 deletions

11
test.js
View File

@@ -1281,6 +1281,17 @@ tests.HGETALL = function () {
});
};
tests.HGETALL_MESSAGE = function () {
var name = "HGETALL_MESSAGE";
client.hmset("msg_test", {message: "hello"}, require_string("OK", name));
client.hgetall("msg_test", function (err, obj) {
assert.strictEqual(null, err, name + " result sent back unexpected error: " + err);
assert.strictEqual(1, Object.keys(obj).length, name);
assert.strictEqual(obj.message, "hello")
next(name);
});
};
tests.HGETALL_NULL = function () {
var name = "HGETALL_NULL";