diff options
author | Aaron <aaron@10gen.com> | 2009-03-24 18:15:47 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-03-24 18:15:47 -0400 |
commit | a265385f1074e624c5acad98b1b3d59a4d704b41 (patch) | |
tree | cbba08231582d9bdf21cfdc466b4b80a703914c4 /dbtests | |
parent | 63a8d2d1731d5e07e09a5a1495a70967d47bba24 (diff) | |
download | mongo-a265385f1074e624c5acad98b1b3d59a4d704b41.tar.gz |
$push checkpoint
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 fdb9515023c..3a64a6039f7 100644 --- a/dbtests/updatetests.cpp +++ b/dbtests/updatetests.cpp @@ -301,6 +301,15 @@ namespace UpdateTests { } }; + class Push : public SetBase { + public: + void run() { + client().insert( ns(), fromjson( "{'_id':0,a:[1]}" ) ); + client().update( ns(), Query(), BSON( "$push" << BSON( "a" << 5 ) ) ); + ASSERT( client().findOne( ns(), Query() ).woCompare( fromjson( "{'_id':0,a:[1,5]}" ) ) == 0 ); + } + }; + class All : public UnitTest::Suite { public: All() { @@ -331,6 +340,7 @@ namespace UpdateTests { add< ModOverwritesExistingObject >(); add< InvalidEmbeddedSet >(); add< UpsertMissingEmbedded >(); + add< Push >(); } }; |