Remove subscription levels; license valid = subscribed

This commit is contained in:
NeilClack
2026-08-15 00:54:24 -05:00
parent 8ca60de647
commit f14bf3e29a
19 changed files with 136 additions and 1534 deletions
-26
View File
@@ -142,32 +142,6 @@ TEST(DatabaseManagerTest, SyncProclamationsPreservesSelectionAndDeletesRemoved)
EXPECT_TRUE(all[0].selected);
}
TEST(DatabaseManagerTest, RequiredLevelIdRoundTripsThroughSync) {
const std::string defId = "default-1";
DbFixture fx("test_rw_db_level.db");
ProclamationRecord def = makeProc(defId, "Default", 1);
def.required_level_id = 1;
ProclamationRecord elite = makeProc("elite", "Elite Only", 2);
elite.required_level_id = 3;
ASSERT_TRUE(fx.db.syncProclamations({def, elite}, defId));
auto all = fx.db.getAllProclamations();
ASSERT_EQ(all.size(), 2u);
for (const auto& p : all) {
EXPECT_EQ(p.required_level_id, p.id == "elite" ? 3 : 1);
}
// A re-sync with the same records keeps the level (and selection).
ASSERT_TRUE(fx.db.syncProclamations({def, elite}, defId));
auto again = fx.db.getAllProclamations();
ASSERT_EQ(again.size(), 2u);
for (const auto& p : again) {
EXPECT_EQ(p.required_level_id, p.id == "elite" ? 3 : 1);
}
}
TEST(DatabaseManagerTest, SyncForcesDefaultProclamationSelected) {
const std::string defId = "default-1";
DbFixture fx("test_rw_db_def.db");