summaryrefslogtreecommitdiff
path: root/jstests/core/find_and_modify_server6254.js
blob: 9850a4f3fb99e3ca2803d7242ac57889c3066e50 (plain)
1
2
3
4
5
6
7
8
9
10

t = db.find_and_modify_server6254;
t.drop();

t.insert( { x : 1 } );
ret = t.findAndModify( { query : { x : 1 } , update : { $set : { x : 2 } } , new : true } );
assert.eq( 2 , ret.x , tojson( ret ) );

assert.eq( 1 , t.count() );