FEATURE: Allow multiple html builders to be registered via plugins

This commit is contained in:
Robin Ward
2017-11-03 11:32:32 -04:00
parent 93633865d9
commit 2f0c9793f1
3 changed files with 13 additions and 4 deletions

View File

@ -51,6 +51,13 @@ describe DiscoursePluginRegistry do
DiscoursePluginRegistry.reset!
expect(DiscoursePluginRegistry.build_html(:my_html)).to be_blank
end
it "can register multiple builders" do
DiscoursePluginRegistry.register_html_builder(:my_html) { "one" }
DiscoursePluginRegistry.register_html_builder(:my_html) { "two" }
expect(DiscoursePluginRegistry.build_html(:my_html)).to eq("one\ntwo")
DiscoursePluginRegistry.reset!
end
end
context '.register_css' do