Skip to content

Commit

Permalink
test(document): fix near sphere test for #4014
Browse files Browse the repository at this point in the history
  • Loading branch information
Fonger committed Aug 13, 2018
1 parent 84dffc3 commit 5484542
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions test/document.test.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2860,12 +2860,16 @@ describe('document', function() {

var MyModel = db.model('gh4014', schema);

MyModel.
where('geo').near({ center: [50, 50] }).
exec(function(error) {
assert.ifError(error);
done();
});
MyModel.on('index', function(err) {
assert.ifError(err);

MyModel.
where('geo').near({ center: [50, 50], spherical: true }).
exec(function(err) {
assert.ifError(err);
done();
});
});
});

it('skip validation if required returns false (gh-4094)', function(done) {
Expand Down

0 comments on commit 5484542

Please sign in to comment.