diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-02-08 13:40:16 -0500 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-02-10 11:06:59 -0500 |
commit | 2eea3f09aea9c92df9aa0d4e47840869bf04d7b8 (patch) | |
tree | 10066683c9d68992cc526544864842c16e1668d8 /jstests/core/and2.js | |
parent | 3d4632aa0f29d5419b8d3e0c545c849fe769f658 (diff) | |
download | mongo-2eea3f09aea9c92df9aa0d4e47840869bf04d7b8.tar.gz |
SERVER-14662 Reject ambiguous positional projections and updates
Diffstat (limited to 'jstests/core/and2.js')
-rw-r--r-- | jstests/core/and2.js | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/jstests/core/and2.js b/jstests/core/and2.js index 0bd13eb7a1d..6e7214eb7f3 100644 --- a/jstests/core/and2.js +++ b/jstests/core/and2.js @@ -11,17 +11,3 @@ t.drop(); t.save( {a:[1,2]} ); t.update( {$and:[{a:1}]}, {$set:{'a.$':5}} ); assert.eq( [5,2], t.findOne().a ); - -// Make sure dollar sign operator with $and is consistent with no $and case -t.drop(); -t.save( {a:[1,2],b:[3,4]} ); -t.update( {a:1,b:4}, {$set:{'a.$':5}} ); -// Probably not what we want here, just trying to make sure $and is consistent -assert.eq( {a:[1,5],b:[3,4]}, t.find( {}, {_id:0} ).toArray()[ 0 ] ); - -// Make sure dollar sign operator with $and is consistent with no $and case -t.drop(); -t.save( {a:[1,2],b:[3,4]} ); -t.update( {a:1,$and:[{b:4}]}, {$set:{'a.$':5}} ); -// Probably not what we want here, just trying to make sure $and is consistent -assert.eq( {a:[1,5],b:[3,4]}, t.find( {}, {_id:0} ).toArray()[ 0 ] ); |