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

add test for providing auth after client is created

This commit is contained in:
Benjamin Coe
2015-09-13 22:21:03 -07:00
parent 68936c5eb2
commit be708906fa

View File

@@ -70,6 +70,17 @@ describe("client authentication", function () {
});
});
it('allows auth to be provided post-hoc with auth method', function (done) {
if (helper.redisProcess().spawnFailed()) this.skip();
var args = config.configureClient(parser, ip);
client = redis.createClient.apply(redis.createClient, args);
client.auth(auth);
client.on("ready", function () {
return done();
});
});
it('reconnects with appropriate authentication', function (done) {
if (helper.redisProcess().spawnFailed()) this.skip();