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