Skip to content

Commit

Permalink
Add test for TLS connect
Browse files Browse the repository at this point in the history
  • Loading branch information
monkbroc committed Jun 27, 2018
1 parent bb081c9 commit 95d09df
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/RedisClient.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ describe('RedisClient', function () {
R.connect('redis://' + HOST + ':' + PORT);
});

it('should connect with TLS', function (done) {
tls.connect = tcreateConnection(t, PORT, HOST);


R.on('connect', function () {
t.ok(true, 'connected');
t.equal(R.connected, true);
done();
});

t.equal(R.connected, false);
R.connect('rediss://' + HOST + ':' + PORT);
});

it('should updatePortAndHostname', function () {
R.updatePortAndHostname(HOST + ':' + PORT);
t.equal(R.uri, 'redis://' + HOST + ':' + PORT);
Expand Down

0 comments on commit 95d09df

Please sign in to comment.