Files
mongo/jstests/core/remove8.js
Siyuan Zhou 3660343e0b SERVER-12127 migrate js tests to jscore suite when not related to writes
Migrate js tests starting from j-z.
Include SERVER-12920 Update use_power_of_2.js

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
2014-03-03 22:54:10 -05:00

22 lines
343 B
JavaScript

t = db.remove8;
t.drop();
N = 1000;
function fill(){
for ( var i=0; i<N; i++ ){
t.save( { x : i } );
}
}
fill();
assert.eq( N , t.count() , "A" );
t.remove( {} )
assert.eq( 0 , t.count() , "B" );
fill();
assert.eq( N , t.count() , "C" );
db.eval( function(){ db.remove8.remove( {} ); } )
assert.eq( 0 , t.count() , "D" );