Skip to content

Commit

Permalink
style: fix lint re: #5765
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Nov 5, 2017
1 parent f147176 commit 9665a04
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/model.geonear.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,18 +303,22 @@ describe('model', function() {
});
});

it('casts (gh-5765)', function() {
it('casts (gh-5765)', function(done) {
if (!mongo24_or_greater) return done();
var Geo = getModel(db);
Geo.init().then(function() {
var g = new Geo({coordinates: [1, 1], type: 'Point', priority: 1});
g.save(function(error) {
assert.ifError(error);
var opts = { maxDistance: 1000, query: { priority: '1' } };
var opts = {
maxDistance: 1000,
query: { priority: '1' },
spherical: true
};
Geo.geoNear([1, 1], opts, function(error, res) {
assert.ifError(error);
assert.equal(res.length, 1);
assert.equal(res[0].priority, 1);
assert.equal(res[0].obj.priority, 1);
done();
});
});
Expand Down

0 comments on commit 9665a04

Please sign in to comment.