Skip to content
Snippets Groups Projects
Commit 5d53a226 authored by Thulinma's avatar Thulinma
Browse files

Actually read out rule_id in PushRule's from_json :weary:

parent ffc1d3e1
No related branches found
No related tags found
No related merge requests found
......@@ -98,6 +98,7 @@ to_json(nlohmann::json &obj, const PushRule &rule)
void
from_json(const nlohmann::json &obj, PushRule &rule)
{
rule.rule_id = obj.value("rule_id", "");
rule.default_ = obj.value("default", false);
rule.enabled = obj.value("enabled", true);
......
......@@ -227,6 +227,7 @@ TEST(Pushrules, GlobalRuleset)
EXPECT_EQ(rules.global.sender.size(), 0);
EXPECT_EQ(rules.global.underride.size(), 6);
EXPECT_EQ(rules.global.underride[0].conditions.at(0).key, "type");
EXPECT_EQ(rules.global.content[0].rule_id, ".m.rule.contains_user_name");
}
TEST(Pushrules, GetGlobalRuleset)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment