summaryrefslogtreecommitdiff
path: root/jstests/query1.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-05-14 10:45:55 -0400
committerEliot Horowitz <eliot@10gen.com>2009-05-14 10:45:55 -0400
commit6ed1a1e376d7028bb4ce4564bb568fce1f87293f (patch)
tree78adbbe91a42508cef1998de8448c86818e9d1c9 /jstests/query1.js
parentabb74ac6fee0f4da92919031d13aa5fa527382f9 (diff)
downloadmongo-6ed1a1e376d7028bb4ce4564bb568fce1f87293f.tar.gz
just another test
Diffstat (limited to 'jstests/query1.js')
-rw-r--r--jstests/query1.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/jstests/query1.js b/jstests/query1.js
new file mode 100644
index 00000000000..9b40054c203
--- /dev/null
+++ b/jstests/query1.js
@@ -0,0 +1,20 @@
+
+t = db.query1;
+t.drop();
+
+t.save( { num : 1 } );
+t.save( { num : 3 } )
+t.save( { num : 4 } );
+
+num = 0;
+total = 0;
+
+t.find().forEach(
+ function(z){
+ num++;
+ total += z.num;
+ }
+);
+
+assert.eq( num , 3 , "num" )
+assert.eq( total , 8 , "total" )