Remove subscription levels; license valid = subscribed
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user