diff options
Diffstat (limited to 'jstests/core/write/update/update8.js')
-rw-r--r-- | jstests/core/write/update/update8.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/jstests/core/write/update/update8.js b/jstests/core/write/update/update8.js new file mode 100644 index 00000000000..596bc8695dd --- /dev/null +++ b/jstests/core/write/update/update8.js @@ -0,0 +1,11 @@ + +t = db.update8; +t.drop(); + +t.update({_id: 1, tags: {"$ne": "a"}}, {"$push": {tags: "a"}}, true); +assert.eq({_id: 1, tags: ["a"]}, t.findOne(), "A"); + +t.drop(); +// SERVER-390 +// t.update( { "x.y" : 1 } , { $inc : { i : 1 } } , true ); +// printjson( t.findOne() ); |