DEV: Allow plugins to add theme modifiers via db migrations (#9192)

This commit is contained in:
David Taylor
2020-03-12 16:35:28 +00:00
committed by GitHub
parent 6102c287f7
commit ec2d49d48a
5 changed files with 40 additions and 13 deletions

View File

@ -20,5 +20,11 @@ describe ThemeModifierSet do
expect(ThemeModifierSet.resolve_modifier_for_themes([t1.id, t2.id], :serialize_topic_excerpts)).to eq(false)
end
it "builds modifiers list from database" do
expect(ThemeModifierSet.modifiers.keys).to include(:serialize_topic_excerpts, :csp_extensions)
expect(ThemeModifierSet.modifiers[:serialize_topic_excerpts][:type]).to eq(:boolean)
expect(ThemeModifierSet.modifiers[:csp_extensions][:type]).to eq(:string_array)
end
end
end