summaryrefslogtreecommitdiff
path: root/jstests/jni2.js
blob: 53ad58c428c3891bbab8f91a1a0cca12bb1c5e70 (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; 
                       } 
            } ).forEach( printjson );
} , null , "can't save from $where" );

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

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