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

Fix .auth not working properly

The arguments parameter was faulty andthe callback could have been triggered twice
This commit is contained in:
Ruben Bridgewater
2015-09-17 23:32:28 +02:00
parent 13635c9c8c
commit d61d97e24e
2 changed files with 23 additions and 16 deletions

View File

@@ -147,6 +147,18 @@ describe("client authentication", function () {
});
client.auth(234567);
});
it('allows auth to be provided post-hoc with auth method again', function (done) {
if (helper.redisProcess().spawnFailed()) this.skip();
var args = config.configureClient(parser, ip, {
auth_pass: auth
});
client = redis.createClient.apply(redis.createClient, args);
client.on("ready", function () {
client.auth(auth, helper.isString('OK', done));
});
});
});
});