diff --git a/app/helpers/application_helper/toolbar_builder.rb b/app/helpers/application_helper/toolbar_builder.rb index d543e347b6d..4957eaf7ca6 100644 --- a/app/helpers/application_helper/toolbar_builder.rb +++ b/app/helpers/application_helper/toolbar_builder.rb @@ -413,7 +413,7 @@ def build_toolbar_hide_button_ops(id) when "diagnostics_summary" return !["refresh_server_summary", "restart_server"].include?(id) when "diagnostics_workers" - return !["restart_workers", "refresh_workers"].include?(id) + return !%w(restart_workers refresh_workers).include?(id) else return true end diff --git a/spec/helpers/application_helper/buttons/refresh_workers_spec.rb b/spec/helpers/application_helper/buttons/refresh_workers_spec.rb index 5a5148824cf..b6b3f8fdfaa 100644 --- a/spec/helpers/application_helper/buttons/refresh_workers_spec.rb +++ b/spec/helpers/application_helper/buttons/refresh_workers_spec.rb @@ -9,7 +9,7 @@ it 'should be visible when active_tab == diagnostics_workers in :diagnostics_tree' do view_context = setup_view_context_with_sandbox({}) button = described_class.new(view_context, {}, {'record' => @record}, {}) - button.instance_variable_set(:@sb, {:active_tab => 'diagnostics_workers'}) + button.instance_variable_set(:@sb, :active_tab => 'diagnostics_workers') expect(button.visible?).to be_truthy end