fixed session tests

This commit is contained in:
Sascha Kühl
2025-10-08 16:03:00 +02:00
parent cb0f6322f4
commit 463647ba59
9 changed files with 144 additions and 91 deletions
+1 -2
View File
@@ -208,7 +208,7 @@ TEST_CASE_METHOD(SessionFixture, "Use session to find all objects with one-to-ma
TEST_CASE_METHOD(SessionFixture, "Use session to find all objects with many-to-many eager relation", "[session][find][many-to-many][eager]") {
auto result = ses.attach<recipe>("recipes")
.and_then( [this] { return ses.attach<ingredient>("ingredients"); } )
.and_then( [this] { return ses.attach<recipe_ingredient>("recipe_ingredients"); } )
// .and_then( [this] { return ses.attach<recipe_ingredient>("recipe_ingredients"); } )
.and_then( [this] { return ses.create_schema(); } );
tables_to_drop.emplace("recipes");
@@ -217,7 +217,6 @@ TEST_CASE_METHOD(SessionFixture, "Use session to find all objects with many-to-m
std::vector<std::unique_ptr<ingredient>> ingredients;
ingredients.push_back(std::make_unique<ingredient>(1, "Apple"));
ingredients.push_back(std::make_unique<ingredient>(1, "Apple"));
ingredients.push_back(std::make_unique<ingredient>(2, "Strawberry"));
ingredients.push_back(std::make_unique<ingredient>(3, "Pineapple"));
ingredients.push_back(std::make_unique<ingredient>(4, "Sugar"));