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