From e8e9754a3cc7eb0ad3f89da46616df60cf42696d Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Fri, 20 May 2022 13:34:43 +0530 Subject: [PATCH] FIX: pass empty hash for view locals by default (#16879) DEV: enable plugin tests for server_plugin_outlet --- app/helpers/application_helper.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a91abf702b0..233e123122b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -449,10 +449,7 @@ module ApplicationHelper @all_connectors = Dir.glob("plugins/*/app/views/connectors/**/*.html.erb") end - def server_plugin_outlet(name, locals: nil) - # Don't evaluate plugins in test - return "" if Rails.env.test? - + def server_plugin_outlet(name, locals: {}) matcher = Regexp.new("/connectors/#{name}/.*\.html\.erb$") erbs = ApplicationHelper.all_connectors.select { |c| c =~ matcher } return "" if erbs.blank?