v1.18.x
barisusakli 10 years ago
parent 4a0482c421
commit 7fc416f18a

@ -7,6 +7,9 @@ var async = require('async'),
describe('Key methods', function() {
beforeEach(function(done) {
db.set('testKey', 'testValue', done);
});
it('should set a key without error', function(done) {
db.set('testKey', 'testValue', function(err) {
@ -56,13 +59,17 @@ describe('Key methods', function() {
});
});
it('should return false if key does not exist or was deleted', function(done) {
it('should return false if key was deleted', function(done) {
db.delete('testKey', function(err) {
assert.equal(err, null);
assert.equal(arguments.length, 1);
db.exists('testKey', function(err, exists) {
assert.equal(err, null);
assert.strictEqual(exists, false);
done();
});
});
});
it('should delete all keys passed in', function(done) {
async.parallel([

Loading…
Cancel
Save