Commit f9683881 authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Peter Leitzen

Fix Rails/SaveBang offenses for ee/spec/lib/gitlab/geo/*

Fixes Rails/SaveBang cop for spec files
parent ce32fa31
......@@ -687,9 +687,6 @@ Rails/SaveBang:
- 'ee/spec/lib/gitlab/background_migration/fix_orphan_promoted_issues_spec.rb'
- 'ee/spec/lib/gitlab/elastic/search_results_spec.rb'
- 'ee/spec/lib/gitlab/email/handler/ee/service_desk_handler_spec.rb'
- 'ee/spec/lib/gitlab/geo/cron_manager_spec.rb'
- 'ee/spec/lib/gitlab/geo/jwt_request_decoder_spec.rb'
- 'ee/spec/lib/gitlab/geo/oauth/session_spec.rb'
- 'ee/spec/lib/gitlab/geo_spec.rb'
- 'ee/spec/lib/gitlab/git_access_spec.rb'
- 'ee/spec/lib/gitlab/import_export/group/relation_factory_spec.rb'
......
---
title: Fix Rails/SaveBang offenses for ee/spec/lib/gitlab/geo/*
merge_request: 41338
author: Rajendra Kadam
type: fixed
......@@ -47,7 +47,7 @@ RSpec.describe Gitlab::Geo::CronManager, :geo do
end
after(:all) do
jobs.each { |name| job(name)&.destroy }
jobs.each { |name| job(name)&.destroy } # rubocop: disable Rails/SaveBang
end
def init_cron_job(job_name, class_name)
......
......@@ -38,7 +38,7 @@ RSpec.describe Gitlab::Geo::JwtRequestDecoder do
data = request.headers['Authorization']
primary_node.secret_access_key = ''
primary_node.save
primary_node.save!
expect(described_class.new(data).decode).to be_nil
end
......
......@@ -71,7 +71,7 @@ RSpec.describe Gitlab::Geo::Oauth::Session, :geo do
it 'includes primary relative URL path' do
api_url = 'http://localhost/relative-path/'
primary_node.update(url: api_url)
primary_node.update!(url: api_url)
api_response = double(parsed: true)
......@@ -88,7 +88,7 @@ RSpec.describe Gitlab::Geo::Oauth::Session, :geo do
context 'primary is configured with relative URL' do
it "makes the request to a primary's relative URL" do
response = ActiveSupport::JSON.encode({ access_token: 'fake-token' }.as_json)
primary_node.update(url: 'http://example.com/gitlab/')
primary_node.update!(url: 'http://example.com/gitlab/')
api_url = "#{primary_node.internal_url}oauth/token"
stub_request(:post, api_url).to_return(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment