summaryrefslogtreecommitdiff
path: root/jstests/basic8.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/basic8.js')
-rw-r--r--jstests/basic8.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/jstests/basic8.js b/jstests/basic8.js
new file mode 100644
index 00000000000..513da0d15d1
--- /dev/null
+++ b/jstests/basic8.js
@@ -0,0 +1,11 @@
+
+t = db.basic8;
+t.drop();
+
+t.save( { a : 1 } );
+o = t.findOne();
+o.b = 2;
+t.save( o );
+
+assert.eq( 1 , t.find().count() , "A" );
+assert.eq( 2 , t.findOne().b , "B" );