mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 01:56:58 +08:00
DEV: Use default admin routes for plugins with settings (#30941)
This change adds a sidebar link for each plugin that fulfils the following criteria: - Does not have an explicit admin route defined in the plugin. - Has at least one site setting (not including enabled/disabled.) That sidebar link leads to the automatically generated plugin show settings page.
This commit is contained in:
@ -33,7 +33,7 @@ TEXT
|
||||
end
|
||||
|
||||
it "defaults to using the plugin name with the discourse- prefix removed" do
|
||||
expect(plugin_instance.humanized_name).to eq("sample-plugin")
|
||||
expect(plugin_instance.humanized_name).to eq("Sample plugin")
|
||||
end
|
||||
|
||||
it "uses the plugin setting category name if it exists" do
|
||||
@ -43,7 +43,7 @@ TEXT
|
||||
|
||||
it "the plugin name the plugin site settings are still under the generic plugins: category" do
|
||||
plugin_instance.stubs(:setting_category).returns("plugins")
|
||||
expect(plugin_instance.humanized_name).to eq("sample-plugin")
|
||||
expect(plugin_instance.humanized_name).to eq("Sample plugin")
|
||||
end
|
||||
|
||||
it "removes any Discourse prefix from the setting category name" do
|
||||
|
Reference in New Issue
Block a user