summaryrefslogtreecommitdiff
path: root/jstests/core/write/update/update8.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/write/update/update8.js')
-rw-r--r--jstests/core/write/update/update8.js11
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() );