File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -229,17 +229,22 @@ TEST_CASE("CRUD functionality", "[driver::collection]") {
229
229
REQUIRE (coll.count ({}) == 1 );
230
230
}
231
231
232
- // TODO: CXX-799 update this test
233
- // SECTION("matching upsert updates document", "[collection]") {
234
- // bsoncxx::builder::stream::document b1;
235
- // b1 << "x" << 1;
236
- // model::insert_many docs{std::initializer_list<bsoncxx::document::view>{b1, b1, b1}};
237
- // coll.insert_many(docs);
238
-
239
- // coll.insert_one(bsoncxx::document::view{});
240
- // REQUIRE(coll.count(b1) == 3);
241
- // REQUIRE(coll.count() == 4);
242
- // }
232
+ SECTION (" test using an insert_many_builder on this collection" , " [collection]" ) {
233
+ auto doc_value = document{} << " x" << 1 << finalize;
234
+ auto doc_view = doc_value.view ();
235
+
236
+ insert_many_builder insert_many{options::insert ()};
237
+ insert_many (doc_view);
238
+ insert_many (doc_view);
239
+ insert_many (doc_view);
240
+
241
+ insert_many.insert (&coll);
242
+
243
+ coll.insert_one (document{} << " b" << 1 << finalize);
244
+
245
+ REQUIRE (coll.count (doc_view) == 3 );
246
+ REQUIRE (coll.count ({}) == 4 );
247
+ }
243
248
244
249
SECTION (" document replacement" , " [collection]" ) {
245
250
document b1;
You can’t perform that action at this time.
0 commit comments