Skip to content

Commit

Permalink
add test for empty queries
Browse files Browse the repository at this point in the history
  • Loading branch information
aheckmann committed Mar 15, 2011
1 parent 9b4d0ac commit 038976d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/model.querying.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@ module.exports = {
db.close();
},

'test that an empty find does not hang': function () {
var db = start()
, BlogPostB = db.model('BlogPostB', collection)

function fn () {
db.close();
};

BlogPostB.find({}, fn);
},

'test that a query is executed when a callback is passed': function () {
var db = start()
, BlogPostB = db.model('BlogPostB', collection)
Expand Down

0 comments on commit 038976d

Please sign in to comment.