summaryrefslogtreecommitdiff
path: root/jstests/temp_cleanup.js
blob: e827083d605b54874e91db0add645963eee27593 (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()