From c939c9ca0ffce62439116e323c2af6d0110b6887 Mon Sep 17 00:00:00 2001 From: archanaserver Date: Sat, 20 Jan 2024 04:24:29 +0530 Subject: [PATCH] Fix Layout/SpaceAroundMethodCallOperator cop --- .rubocop.yml | 3 +++ test/controllers/api/v2/hosts_controller_test.rb | 4 ++-- test/models/compute_resources/ovirt_test.rb | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index c4f821c5b9af..49c3b04f01fd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -83,6 +83,9 @@ Style/PreferredHashMethods: Layout/SpaceAroundOperators: Enabled: true +Layout/SpaceAroundMethodCallOperator: + Enabled: true + Layout/EmptyLinesAroundAttributeAccessor: Enabled: true diff --git a/test/controllers/api/v2/hosts_controller_test.rb b/test/controllers/api/v2/hosts_controller_test.rb index af1f69a4ce43..a3022683b5e7 100644 --- a/test/controllers/api/v2/hosts_controller_test.rb +++ b/test/controllers/api/v2/hosts_controller_test.rb @@ -864,8 +864,8 @@ def initialize_proxy_ops test 'responds correctly for non-admin user if BMC is available' do ProxyAPI::BMC.any_instance.stubs(:boot). - with({ :function => 'bootdevice', :device => 'bios' }). - returns({ "action" => "bios", "result" => true } .to_json) + with(:function => 'bootdevice', :device => 'bios'). + returns({ "action" => "bios", "result" => true }.to_json) put :boot, params: { :id => @bmchost.to_param, :device => 'bios' }, session: set_session_user.merge(:user => @one.id) assert_response :success diff --git a/test/models/compute_resources/ovirt_test.rb b/test/models/compute_resources/ovirt_test.rb index 593a3a008ab8..d5ba2f21ea7c 100644 --- a/test/models/compute_resources/ovirt_test.rb +++ b/test/models/compute_resources/ovirt_test.rb @@ -1,7 +1,7 @@ require 'test_helper' require 'models/compute_resources/compute_resource_test_helpers' -class Foreman::Model:: OvirtTest < ActiveSupport::TestCase +class Foreman::Model::OvirtTest < ActiveSupport::TestCase include ComputeResourceTestHelpers should validate_presence_of(:url)