diff options
Diffstat (limited to 'jstests/core/geonear_validate.js')
-rw-r--r-- | jstests/core/geonear_validate.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/core/geonear_validate.js b/jstests/core/geonear_validate.js new file mode 100644 index 00000000000..49d4c1ade15 --- /dev/null +++ b/jstests/core/geonear_validate.js @@ -0,0 +1,8 @@ +// Test to make sure that geoNear validates numWanted +t = db.geonear_validate +t.drop(); +t.ensureIndex({ geo : "2dsphere" }) +origin = { "type" : "Point", "coordinates": [ 0, 0] } +t.insert({geo: origin}) +res = db.runCommand({geoNear: t.getName(), near: [0,0], spherical: true, num: -1}); +assert.eq(0, res.ok); |