mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 23:15:48 +01:00
test fix
This commit is contained in:
@@ -7,6 +7,9 @@ var async = require('async'),
|
|||||||
|
|
||||||
describe('Key methods', function() {
|
describe('Key methods', function() {
|
||||||
|
|
||||||
|
beforeEach(function(done) {
|
||||||
|
db.set('testKey', 'testValue', done);
|
||||||
|
});
|
||||||
|
|
||||||
it('should set a key without error', function(done) {
|
it('should set a key without error', function(done) {
|
||||||
db.set('testKey', 'testValue', function(err) {
|
db.set('testKey', 'testValue', function(err) {
|
||||||
@@ -56,11 +59,15 @@ 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.exists('testKey', function(err, exists) {
|
db.delete('testKey', function(err) {
|
||||||
assert.equal(err, null);
|
assert.equal(err, null);
|
||||||
assert.strictEqual(exists, false);
|
assert.equal(arguments.length, 1);
|
||||||
done();
|
db.exists('testKey', function(err, exists) {
|
||||||
|
assert.equal(err, null);
|
||||||
|
assert.strictEqual(exists, false);
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user