FEATURE: adds support for loading existing core asset in pretty text

This commit is contained in:
Joffrey JAFFEUX
2018-04-10 08:37:16 +02:00
committed by GitHub
parent 867f327055
commit 45f657336e
5 changed files with 42 additions and 1 deletions

View File

@@ -93,6 +93,15 @@ describe Plugin::Instance do
expect(DiscoursePluginRegistry.mobile_stylesheets.count).to eq(0)
expect(DiscoursePluginRegistry.stylesheets.count).to eq(2)
end
it "remaps vendored_core_pretty_text asset" do
plugin = Plugin::Instance.new nil, "/tmp/test.rb"
plugin.register_asset("moment.js", :vendored_core_pretty_text)
plugin.send :register_assets!
expect(DiscoursePluginRegistry.vendored_core_pretty_text.first).to eq("lib/javascripts/moment.js")
end
end
context "register service worker" do