diff options
author | Hari Khalsa <hkhalsa@10gen.com> | 2013-01-30 15:40:55 -0500 |
---|---|---|
committer | Hari Khalsa <hkhalsa@10gen.com> | 2013-02-07 14:14:57 -0500 |
commit | 4f5d0af7ed9ffd1f1d75a46ac3201643451b0bfb (patch) | |
tree | fccef70b12d6f8c47418eb81375977cb763f128f /jstests/geonear_validate.js | |
parent | 6d58823d47c1cb1ddbd29e774819b1bd81661cc5 (diff) | |
download | mongo-4f5d0af7ed9ffd1f1d75a46ac3201643451b0bfb.tar.gz |
SERVER-8387 check numWanted in geoNear
Diffstat (limited to 'jstests/geonear_validate.js')
-rw-r--r-- | jstests/geonear_validate.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/geonear_validate.js b/jstests/geonear_validate.js new file mode 100644 index 00000000000..49d4c1ade15 --- /dev/null +++ b/jstests/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); |