diff options
author | Dianna Hohensee <dianna.hohensee@10gen.com> | 2017-05-24 12:12:35 -0400 |
---|---|---|
committer | Dianna Hohensee <dianna.hohensee@10gen.com> | 2017-05-30 17:31:21 -0400 |
commit | efcb72ca994a941fe1abaac872f8d9ec38756bd9 (patch) | |
tree | 7df9b618e46690e31c699f0a61ef6a5a5bffe38d /jstests/core/update_addToSet3.js | |
parent | 65c871e6821bd2550ef967c175a9a8e265bd208f (diff) | |
download | mongo-efcb72ca994a941fe1abaac872f8d9ec38756bd9.tar.gz |
SERVER-29351 remove redundant use of BSONObj::storageValidEmbedded from modifier_add_to_set.cpp
Diffstat (limited to 'jstests/core/update_addToSet3.js')
-rw-r--r-- | jstests/core/update_addToSet3.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/core/update_addToSet3.js b/jstests/core/update_addToSet3.js index b37112042cc..efd682cef4c 100644 --- a/jstests/core/update_addToSet3.js +++ b/jstests/core/update_addToSet3.js @@ -1,3 +1,4 @@ +// Test the use of $each in $addToSet t = db.update_addToSet3; t.drop(); @@ -15,3 +16,6 @@ assert.eq(t.findOne(), {_id: 1, a: [6, 5, 4, 3, 2, 1, 7, 9]}, "A3"); t.update({_id: 1}, {$addToSet: {a: {$each: [12, 13, 12]}}}); assert.eq(t.findOne(), {_id: 1, a: [6, 5, 4, 3, 2, 1, 7, 9, 12, 13]}, "A4"); + +assert.writeError(t.update({_id: 1}, {$addToSet: {a: {$each: 0}}})); +assert.writeError(t.update({_id: 1}, {$addToSet: {a: {$each: {a: 1}}}})); |