Permalink
Browse files

Fix test case to handle array locations from includeLoc

  • Loading branch information...
1 parent f178107 commit e86718e4d39f9ac290dcbfce789debffe067e583 gregs committed Sep 29, 2011
Showing with 2 additions and 8 deletions.
  1. +2 −8 jstests/geo_uniqueDocs2.js
View
@@ -62,14 +62,8 @@ arrLocs = [[20,30,['loc1','loca']],[40,50,['loc2','locb']]];
t.save( {loc:arrLocs} );
results = db.runCommand( { geoNear : collName , near : [50,50], num : 10, uniqueDocs : false, includeLocs : true } ).results;
// The original loc arrays are returned as objects.
-expectedLocs = []
-arrLocs.forEach( function( x ) {
- obj = {};
- for( i = 0; i < x.length; ++i ) {
- obj[ i ] = x[ i ];
- }
- expectedLocs.push( obj );
- } );
+expectedLocs = arrLocs
+
assert.contains( results[0].loc, expectedLocs );
assert.contains( results[1].loc, expectedLocs );

0 comments on commit e86718e

Please sign in to comment.