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

t = db.jni2;
t.remove( {} );

db.jni2t.remove( {} );

assert.eq( 0 , db.jni2t.find().length() , "A" );

t.save( { z : 1 } );
t.save( { z : 2 } );
assert.throws( function(){
    t.find( { $where : 
                       function(){ 
                           db.jni2t.save( { y : 1 } );
                           return 1; 
                       } 
            } ).length();
} , "can't save from $where" );

assert.eq( 0 , db.jni2t.find().length() , "B" )

assert(t.validate().valid , "E");