Commit 87439f70 authored by Fabio Pitino's avatar Fabio Pitino

Merge branch 'issue#220040-fix-rails-savebang-presenter-module' into 'master'

Fix Rails/SaveBang Rubocop offenses for presenters

See merge request gitlab-org/gitlab!57888
parents 4372faae 121d1233
......@@ -354,9 +354,6 @@ Rails/SaveBang:
- 'spec/models/user_status_spec.rb'
- 'spec/models/wiki_page/meta_spec.rb'
- 'spec/models/wiki_page_spec.rb'
- 'spec/presenters/ci/build_runner_presenter_spec.rb'
- 'spec/presenters/ci/trigger_presenter_spec.rb'
- 'spec/presenters/packages/conan/package_presenter_spec.rb'
- 'spec/requests/api/ci/runner_spec.rb'
- 'spec/requests/api/commit_statuses_spec.rb'
- 'spec/requests/api/conan_packages_spec.rb'
......
---
title: Fix Rails/SaveBang Rubocop offenses for presenters
merge_request: 57888
author: Huzaifa Iftikhar @huzaifaiftikhar
type: fixed
......@@ -223,7 +223,7 @@ RSpec.describe Ci::BuildRunnerPresenter do
let(:build) { create(:ci_build, ref: pipeline.ref, pipeline: pipeline) }
before do
pipeline.persistent_ref.create
pipeline.persistent_ref.create # rubocop:disable Rails/SaveBang
end
it 'returns the correct refspecs' do
......@@ -261,7 +261,7 @@ RSpec.describe Ci::BuildRunnerPresenter do
let(:build) { create(:ci_build, pipeline: pipeline) }
before do
pipeline.persistent_ref.create
pipeline.persistent_ref.create # rubocop:disable Rails/SaveBang
end
it 'exposes the persistent pipeline ref' do
......
......@@ -35,7 +35,7 @@ RSpec.describe Ci::TriggerPresenter do
context 'when user is a trigger owner and builds admin' do
before do
trigger.update(owner: user)
trigger.update!(owner: user)
end
describe '#token' do
......
......@@ -146,7 +146,7 @@ RSpec.describe ::Packages::Conan::PackagePresenter do
before do
[info_file, manifest_file, package_file].each do |file|
file.conan_file_metadatum.conan_package_reference = alternative_reference
file.save
file.save!
end
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