summaryrefslogtreecommitdiff
path: root/jstests/core/update8.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/update8.js')
-rw-r--r--jstests/core/update8.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/jstests/core/update8.js b/jstests/core/update8.js
new file mode 100644
index 00000000000..2388ff85c9d
--- /dev/null
+++ b/jstests/core/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() );