DEV: do not run plugin tests for server_plugin_outlet (#16880)

This commit is contained in:
Arpit Jalan 2022-05-20 14:01:14 +05:30 committed by GitHub
parent e8e9754a3c
commit 77a8a4bee6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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