Commit de13c9e2 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'rails-save-bang-ee-spec-models-geo' into 'master'

Fix Rails/SaveBang offenses in ee/spec/models/geo

See merge request gitlab-org/gitlab!58115
parents 8dc67118 0953f72d
......@@ -73,9 +73,6 @@ Rails/SaveBang:
- 'ee/spec/models/elasticsearch_indexed_namespace_spec.rb'
- 'ee/spec/models/environment_spec.rb'
- 'ee/spec/models/epic_spec.rb'
- 'ee/spec/models/geo/project_registry_spec.rb'
- 'ee/spec/models/geo_node_spec.rb'
- 'ee/spec/models/geo_node_status_spec.rb'
- 'ee/spec/models/gitlab_subscription_spec.rb'
- 'ee/spec/models/issue_spec.rb'
- 'ee/spec/models/label_note_spec.rb'
......
---
title: Fix Rails/SaveBang rubocop offenses in ee/spec/models/
merge_request: 58115
author: Abdul Wadood @abdulwd
type: fixed
......@@ -797,7 +797,7 @@ RSpec.describe Geo::ProjectRegistry, :geo do
end
it 'sets repository_retry_at to a future time' do
subject.update(repository_retry_count: 0)
subject.update!(repository_retry_count: 0)
subject.fail_sync!(type, message, error)
......@@ -805,7 +805,7 @@ RSpec.describe Geo::ProjectRegistry, :geo do
end
it 'ensures repository_retry_at is capped at one hour' do
subject.update(repository_retry_count: 31)
subject.update!(repository_retry_count: 31)
subject.fail_sync!(type, message, error)
......@@ -882,7 +882,7 @@ RSpec.describe Geo::ProjectRegistry, :geo do
end
it 'sets wiki_retry_at to a future time' do
subject.update(wiki_retry_count: 0)
subject.update!(wiki_retry_count: 0)
subject.fail_sync!(type, message, error)
......@@ -890,7 +890,7 @@ RSpec.describe Geo::ProjectRegistry, :geo do
end
it 'ensures wiki_retry_at is capped at one hour' do
subject.update(wiki_retry_count: 31)
subject.update!(wiki_retry_count: 31)
subject.fail_sync!(type, message, error)
......
......@@ -148,7 +148,7 @@ RSpec.describe GeoNode, :request_store, :geo, type: :model do
context 'when the oauth_application is missing' do
before do
node.oauth_application.destroy
node.oauth_application.destroy!
node.oauth_application = nil
end
......@@ -255,7 +255,7 @@ RSpec.describe GeoNode, :request_store, :geo, type: :model do
it 'expires cache when removed' do
expect(node).to receive(:expire_cache!) # 1 for creation 1 for deletion
node.destroy
node.destroy!
end
end
......@@ -596,7 +596,7 @@ RSpec.describe GeoNode, :request_store, :geo, type: :model do
expect(status).to be_a(GeoNodeStatus)
status.save
status.save!
expect(new_node.find_or_build_status).to eq(status)
end
......
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