summaryrefslogtreecommitdiff
path: root/jstests/core/temp_cleanup.js
blob: 895f7c5f8b99267b6df705f43b83981e2d0346ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

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();