Skip to content

Commit 0d283cf

Browse files
committed
Add count 0 test
1 parent faf96a0 commit 0d283cf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/sqlite.test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@ describe('sqlite3 connector', function() {
158158
done();
159159
});
160160
});
161+
162+
it('should return 0 documents when filtering with non existing field',
163+
function(done) {
164+
Post.count({nonexistingfield: '__TEST__'},
165+
function(err, count) {
166+
should.not.exists(err);
167+
count.should.equal(0);
168+
done();
169+
});
170+
});
161171
});
162172

163173
// FIXME: The following test cases are to be reactivated for PostgreSQL

0 commit comments

Comments
 (0)