diff options
Diffstat (limited to 'jstests/core/geo_validate.js')
-rw-r--r-- | jstests/core/geo_validate.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/core/geo_validate.js b/jstests/core/geo_validate.js index 2d3782e233a..5b9957166c3 100644 --- a/jstests/core/geo_validate.js +++ b/jstests/core/geo_validate.js @@ -91,3 +91,9 @@ assert.commandWorked(db.runCommand({geoNear: coll.getName(), // // SERVER-17241 Polygon has no loop assert.writeError(coll.insert({ geo : { type: 'Polygon', coordinates: [] } })); + +// +// SERVER-17486 Loop has less then 3 vertices. +assert.writeError(coll.insert({geo: {type: 'Polygon', coordinates: [[]]}})); +assert.writeError(coll.insert({geo: {type: 'Polygon', coordinates: [[[0,0]]]}})); +assert.writeError(coll.insert({geo: {type: 'Polygon', coordinates: [[[0,0], [0,0], [0,0], [0,0]]]}})); |