diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-05-22 10:48:58 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-05-22 10:48:58 -0400 |
commit | 21d086887349e1520786b2b3f270c37e90097fcc (patch) | |
tree | 2737a8133772db87aafb463d39207a3b834e897a /dbtests | |
parent | 2eddff58bb98e81a7cb34d193a16354bf1e17eb3 (diff) | |
parent | d8e129c8ab3844903cd19ae565ab32faf0aadd59 (diff) | |
download | mongo-21d086887349e1520786b2b3f270c37e90097fcc.tar.gz |
Merge branch 'master' of git@github.com:mongodb/mongo
Diffstat (limited to 'dbtests')
-rw-r--r-- | dbtests/updatetests.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dbtests/updatetests.cpp b/dbtests/updatetests.cpp index 6c50b3b39d4..10beba793c0 100644 --- a/dbtests/updatetests.cpp +++ b/dbtests/updatetests.cpp @@ -456,6 +456,15 @@ namespace UpdateTests { } }; + class UpdateMissingToNull : public SetBase { + public: + void run() { + client().insert( ns(), BSON( "a" << 5 ) ); + client().update( ns(), BSON( "a" << 5 ), fromjson( "{$set:{b:null}}" ) ); + ASSERT_EQUALS( jstNULL, client().findOne( ns(), QUERY( "a" << 5 ) ).getField( "b" ).type() ); + } + }; + class All : public Suite { public: All() { @@ -503,6 +512,7 @@ namespace UpdateTests { add< ModParentOfIndex >(); add< PreserveIdWithIndex >(); add< CheckNoMods >(); + add< UpdateMissingToNull >(); } }; |