Files
mongo/jstests/core/updatec.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

15 lines
368 B
JavaScript

t = db.updatec;
t.drop();
t.update( { "_id" : 123 }, { $set : { "v" : { "i" : 123, "a":456 } }, $push : { "f" : 234} }, 1, 0 );
t.update( { "_id" : 123 }, { $set : { "v" : { "i" : 123, "a":456 } }, $push : { "f" : 234} }, 1, 0 );
assert.docEq(
{
"_id" : 123,
"f" : [ 234, 234 ] ,
"v" : { "i" : 123, "a" : 456 }
} , t.findOne() );