From 410d9fa4fa3b89a51db6c8bd14617fe57b4aba0a Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 25 Dec 2014 03:00:05 -0500 Subject: [PATCH] fix more tests --- src/database/mongo/main.js | 4 +++- tests/database/keys.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/database/mongo/main.js b/src/database/mongo/main.js index f02854b362..8f326ebb57 100644 --- a/src/database/mongo/main.js +++ b/src/database/mongo/main.js @@ -91,7 +91,9 @@ module.exports = function(db, module) { if (!Array.isArray(keys) || !keys.length) { return callback(); } - db.collection('objects').remove({_key: {$in: keys}}, callback); + db.collection('objects').remove({_key: {$in: keys}}, function(err, res) { + callback(err); + }); }; module.get = function(key, callback) { diff --git a/tests/database/keys.js b/tests/database/keys.js index c0b4715bd9..747c3b994a 100644 --- a/tests/database/keys.js +++ b/tests/database/keys.js @@ -39,7 +39,7 @@ describe('Key methods', function() { db.get('testKey', function(err, value) { assert.equal(err, null, 'db.get error'); - assert.equal(value, false, 'db.get deleted key is not falsy'); + assert.equal(false, !!value, 'db.get deleted key is not falsy'); done(); }); });