Able to query multiple documens

pull/2/head
Louis Chatriot 12 years ago
parent c0a0cd8c39
commit f0f5161a37
  1. 9
      test/db.test.js

@ -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);
}); });

Loading…
Cancel
Save