Skip to content

Commit

Permalink
add a data writing test
Browse files Browse the repository at this point in the history
  • Loading branch information
jamessharp committed Nov 20, 2014
1 parent 5226d31 commit daaca10
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,29 @@ describe('Redis Sentinel tests', function() {
});
});
});

describe('data writing', function() {

var redisClient;

before(function() {
var endpoints = [
{ host: '127.0.0.1', port: 26380},
{ host: '127.0.0.1', port: 26379}
];
redisClient = sentinel.createClient(endpoints);
redisClient.select(9);
});

it('should write a key and return it', function(done) {
redisClient.set('__test__', 'some value', function(err) {
expect(err).to.be.null;
redisClient.get('__test__', function(err, val) {
expect(err).to.be.null;
expect(val).to.equal('some value');
done();
});
});
});
});
});

0 comments on commit daaca10

Please sign in to comment.