diff --git a/test/auth.spec.js b/test/auth.spec.js index b1a9cd86cc..57c88f707d 100644 --- a/test/auth.spec.js +++ b/test/auth.spec.js @@ -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();