diff options
author | David Storch <david.storch@10gen.com> | 2015-12-29 15:05:15 -0500 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2016-01-06 14:11:18 -0500 |
commit | 89b5c11f9363e15aa590abf59350b6a7630e7367 (patch) | |
tree | 6f0834a60cc4c8f377fb12774ea9d88b14d6d63a | |
parent | eb64fca87952caa030fefd06c1090cdeef6ef12f (diff) | |
download | mongo-89b5c11f9363e15aa590abf59350b6a7630e7367.tar.gz |
SERVER-21647 add missing $rename unit test
(cherry picked from commit b45dba8425b49714c5ca1394aba0bb97029c2560)
-rw-r--r-- | src/mongo/db/ops/modifier_rename_test.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/ops/modifier_rename_test.cpp b/src/mongo/db/ops/modifier_rename_test.cpp index e6d91c471b6..24d8be65a23 100644 --- a/src/mongo/db/ops/modifier_rename_test.cpp +++ b/src/mongo/db/ops/modifier_rename_test.cpp @@ -155,6 +155,12 @@ TEST(MoveOnSamePath, MoveDown) { mod.init(fromjson("{'b':'b.a'}").firstElement(), ModifierInterface::Options::normal())); } +TEST(MoveOnSamePath, MoveToSelf) { + ModifierRename mod; + ASSERT_NOT_OK( + mod.init(fromjson("{'b.a':'b.a'}").firstElement(), ModifierInterface::Options::normal())); +} + TEST(MissingTo, SimpleNumberAtRoot) { Document doc(fromjson("{a: 2}")); Mod setMod(fromjson("{$rename: {'a':'b'}}")); |