Commit 01b295e5 authored by Siddharth Asthana's avatar Siddharth Asthana Committed by Markus Koller

Fix Rails/SaveBang offenses

Changelog: other
parent 6566e279
...@@ -15,11 +15,6 @@ Rails/SaveBang: ...@@ -15,11 +15,6 @@ Rails/SaveBang:
- spec/lib/gitlab/database/custom_structure_spec.rb - spec/lib/gitlab/database/custom_structure_spec.rb
- spec/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers_spec.rb - spec/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers_spec.rb
- spec/lib/gitlab/database_importers/self_monitoring/project/create_service_spec.rb - spec/lib/gitlab/database_importers/self_monitoring/project/create_service_spec.rb
- spec/lib/gitlab/import_export/fast_hash_serializer_spec.rb
- spec/lib/gitlab/import_export/fork_spec.rb
- spec/lib/gitlab/import_export/group/legacy_tree_saver_spec.rb
- spec/lib/gitlab/import_export/group/relation_factory_spec.rb
- spec/lib/gitlab/import_export/group/tree_saver_spec.rb
- spec/lib/gitlab/import_export/importer_spec.rb - spec/lib/gitlab/import_export/importer_spec.rb
- spec/lib/gitlab/import_export/lfs_restorer_spec.rb - spec/lib/gitlab/import_export/lfs_restorer_spec.rb
- spec/lib/gitlab/import_export/lfs_saver_spec.rb - spec/lib/gitlab/import_export/lfs_saver_spec.rb
......
...@@ -240,7 +240,7 @@ RSpec.describe Gitlab::ImportExport::FastHashSerializer do ...@@ -240,7 +240,7 @@ RSpec.describe Gitlab::ImportExport::FastHashSerializer do
merge_request = create(:merge_request, source_project: project, milestone: milestone) merge_request = create(:merge_request, source_project: project, milestone: milestone)
ci_build = create(:ci_build, project: project, when: nil) ci_build = create(:ci_build, project: project, when: nil)
ci_build.pipeline.update(project: project) ci_build.pipeline.update!(project: project)
create(:commit_status, project: project, pipeline: ci_build.pipeline) create(:commit_status, project: project, pipeline: ci_build.pipeline)
create_list(:ci_pipeline, 5, :success, project: project) create_list(:ci_pipeline, 5, :success, project: project)
......
...@@ -38,8 +38,8 @@ RSpec.describe 'forked project import' do ...@@ -38,8 +38,8 @@ RSpec.describe 'forked project import' do
allow(instance).to receive(:storage_path).and_return(export_path) allow(instance).to receive(:storage_path).and_return(export_path)
end end
saver.save saver.save # rubocop:disable Rails/SaveBang
repo_saver.save repo_saver.save # rubocop:disable Rails/SaveBang
repo_restorer.restore repo_restorer.restore
restorer.restore restorer.restore
......
...@@ -31,7 +31,7 @@ RSpec.describe Gitlab::ImportExport::Group::LegacyTreeSaver do ...@@ -31,7 +31,7 @@ RSpec.describe Gitlab::ImportExport::Group::LegacyTreeSaver do
# ^ These are specific for the Group::LegacyTreeSaver # ^ These are specific for the Group::LegacyTreeSaver
context 'JSON' do context 'JSON' do
let(:saved_group_json) do let(:saved_group_json) do
group_tree_saver.save group_tree_saver.save # rubocop:disable Rails/SaveBang
group_json(group_tree_saver.full_path) group_json(group_tree_saver.full_path)
end end
...@@ -88,7 +88,7 @@ RSpec.describe Gitlab::ImportExport::Group::LegacyTreeSaver do ...@@ -88,7 +88,7 @@ RSpec.describe Gitlab::ImportExport::Group::LegacyTreeSaver do
end end
before do before do
user2.update(public_email: user2.email) user2.update!(public_email: user2.email)
group.add_developer(user2) group.add_developer(user2)
end end
......
...@@ -9,7 +9,7 @@ RSpec.describe Gitlab::ImportExport::Group::RelationFactory do ...@@ -9,7 +9,7 @@ RSpec.describe Gitlab::ImportExport::Group::RelationFactory do
let(:importer_user) { admin } let(:importer_user) { admin }
let(:excluded_keys) { [] } let(:excluded_keys) { [] }
let(:created_object) do let(:created_object) do
described_class.create( described_class.create( # rubocop:disable Rails/SaveBang
relation_sym: relation_sym, relation_sym: relation_sym,
relation_hash: relation_hash, relation_hash: relation_hash,
relation_index: 1, relation_index: 1,
......
...@@ -42,7 +42,7 @@ RSpec.describe Gitlab::ImportExport::Group::TreeSaver do ...@@ -42,7 +42,7 @@ RSpec.describe Gitlab::ImportExport::Group::TreeSaver do
context 'exported files' do context 'exported files' do
before do before do
group_tree_saver.save group_tree_saver.save # rubocop:disable Rails/SaveBang
end end
it 'has one group per line' do it 'has one group per line' do
......
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