summaryrefslogtreecommitdiff
path: root/jstests/eval6.js
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2014-03-03 15:04:57 -0500
committerRandolph Tan <randolph@10gen.com>2014-03-03 15:29:00 -0500
commitf8534ae0d6c4e252d169c5bcf42f42cf6518ee7d (patch)
treee35db08d5d7ea3d70b6925f30bec0881efd2ee83 /jstests/eval6.js
parent6a10de0bb8fe996daca5ecd5687f1072abb0dd8b (diff)
downloadmongo-f8534ae0d6c4e252d169c5bcf42f42cf6518ee7d.tar.gz
SERVER-12127 migrate js tests to jscore suite when not related to writes
Temporarily put back jstest in order not to lose test coverage
Diffstat (limited to 'jstests/eval6.js')
-rw-r--r--jstests/eval6.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/jstests/eval6.js b/jstests/eval6.js
new file mode 100644
index 00000000000..5fe096974c6
--- /dev/null
+++ b/jstests/eval6.js
@@ -0,0 +1,15 @@
+
+t = db.eval6;
+t.drop();
+
+t.save( { a : 1 } );
+
+db.eval(
+ function(){
+ o = db.eval6.findOne();
+ o.b = 2;
+ db.eval6.save( o );
+ }
+);
+
+assert.eq( 2 , t.findOne().b );