summaryrefslogtreecommitdiff
path: root/jstests/core/update_multi5.js
blob: c6d51ef0196d6757fb54d8f3936084841408d38a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 );
    }
);