mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
test fix
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user