|
|
@ -127,7 +127,7 @@ describe('Database', function () { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
, function (cb) { // Test with empty object
|
|
|
|
, function (cb) { // Test with query that will return docs
|
|
|
|
d.find({ somedata: 'again' }, function (err, docs) { |
|
|
|
d.find({ somedata: 'again' }, function (err, docs) { |
|
|
|
assert.isNull(err); |
|
|
|
assert.isNull(err); |
|
|
|
docs.length.should.equal(2); |
|
|
|
docs.length.should.equal(2); |
|
|
@ -135,6 +135,13 @@ describe('Database', function () { |
|
|
|
return cb(); |
|
|
|
return cb(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
, function (cb) { // Test with query that doesn't match anything
|
|
|
|
|
|
|
|
d.find({ somedata: 'nope' }, function (err, docs) { |
|
|
|
|
|
|
|
assert.isNull(err); |
|
|
|
|
|
|
|
docs.length.should.equal(0); |
|
|
|
|
|
|
|
return cb(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
], done); |
|
|
|
], done); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|