Files
mongo/jstests/core/set5.js
Siyuan Zhou 3660343e0b SERVER-12127 migrate js tests to jscore suite when not related to writes
Migrate js tests starting from j-z.
Include SERVER-12920 Update use_power_of_2.js

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
2014-03-03 22:54:10 -05:00

18 lines
349 B
JavaScript

t = db.set5;
t.drop();
function check( want , err ){
var x = t.findOne();
delete x._id;
assert.docEq( want , x , err );
}
t.update( { a : 5 } , { $set : { a : 6 , b : null } } , true );
check( { a : 6 , b : null } , "A" )
t.drop();
t.update( { z : 5 } , { $set : { z : 6 , b : null } } , true );
check( { b : null , z : 6 } , "B" )