DEV: allow running plugin tests for server_plugin_outlet (#16883)

This commit allows us to run plugin tests for `server_plugin_outlet`
method.
This commit is contained in:
Arpit Jalan 2022-05-20 17:14:55 +05:30 committed by GitHub
parent eddb8891c4
commit 578955dcc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -450,8 +450,7 @@ module ApplicationHelper
end
def server_plugin_outlet(name, locals: {})
# Don't evaluate plugins in test
return "" if Rails.env.test?
return "" if !GlobalSetting.load_plugins?
matcher = Regexp.new("/connectors/#{name}/.*\.html\.erb$")
erbs = ApplicationHelper.all_connectors.select { |c| c =~ matcher }