summaryrefslogtreecommitdiff
path: root/jstests/core/updateb.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/updateb.js')
-rw-r--r--jstests/core/updateb.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/jstests/core/updateb.js b/jstests/core/updateb.js
new file mode 100644
index 00000000000..d85e19a36bc
--- /dev/null
+++ b/jstests/core/updateb.js
@@ -0,0 +1,11 @@
+
+t = db.updateb;
+t.drop();
+
+t.update( { "x.y" : 2 } , { $inc : { a : 7 } } , true );
+
+correct = { a : 7 , x : { y : 2 } };
+got = t.findOne();
+delete got._id;
+assert.docEq( correct , got , "A" )
+