Permalink
Browse files

simple multi update test

  • Loading branch information...
1 parent e79e21e commit b45d58e2adf9b5d06cb5dbfad417e5c6b9cb807f @erh erh committed Jun 4, 2010
Showing with 17 additions and 0 deletions.
  1. +17 −0 jstests/update_multi5.js
View
17 jstests/update_multi5.js
@@ -0,0 +1,17 @@
+
+t = db.update_multi5;
+
+t.drop()
+
+t.insert({path: 'r1', subscribers: [1,2]});
+t.insert({path: 'r2', subscribers: [3,4]});
+
+t.update({}, {$addToSet: {subscribers: 5}}, false, true);
+
+t.find().forEach(
+ function(z){
+ assert.eq( 3 , z.subscribers.length , z );
+ }
+);
+
+

0 comments on commit b45d58e

Please sign in to comment.