Skip to content

Commit be70890

Browse files
author
Benjamin Coe
committed
add test for providing auth after client is created
1 parent 68936c5 commit be70890

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/auth.spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ describe("client authentication", function () {
7070
});
7171
});
7272

73+
it('allows auth to be provided post-hoc with auth method', function (done) {
74+
if (helper.redisProcess().spawnFailed()) this.skip();
75+
76+
var args = config.configureClient(parser, ip);
77+
client = redis.createClient.apply(redis.createClient, args);
78+
client.auth(auth);
79+
client.on("ready", function () {
80+
return done();
81+
});
82+
});
83+
7384
it('reconnects with appropriate authentication', function (done) {
7485
if (helper.redisProcess().spawnFailed()) this.skip();
7586

0 commit comments

Comments
 (0)