Skip to content

Commit

Permalink
simple multi update test
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Jun 4, 2010
1 parent e79e21e commit b45d58e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions 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.