summaryrefslogtreecommitdiff
path: root/jstests/core/temp_cleanup.js
blob: d9dc7fdcccfa2b4ad242ae8fe9056487dcd60d7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

mydb = db.getSisterDB( "temp_cleanup_test" );

t = mydb.tempCleanup;
t.drop();

t.insert( { x : 1 } );

res = t.mapReduce( function(){ emit(1,1); } , function(){ return 1; } , "xyz" );
printjson( res );

assert.eq( 1 , t.count() , "A1" );
assert.eq( 1 , mydb[res.result].count() , "A2" );

mydb.dropDatabase();