Commit 80a73b15 authored by Abdul Wadood's avatar Abdul Wadood

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

Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/220040.
parent ff346be2
......@@ -67,8 +67,6 @@ Rails/SaveBang:
- 'ee/spec/models/approval_merge_request_rule_spec.rb'
- 'ee/spec/models/approval_project_rule_spec.rb'
- 'ee/spec/models/burndown_spec.rb'
- 'ee/spec/models/ci/pipeline_spec.rb'
- 'ee/spec/models/ci/subscriptions/project_spec.rb'
- 'ee/spec/models/ee/appearance_spec.rb'
- 'ee/spec/models/ee/ci/job_artifact_spec.rb'
- 'ee/spec/models/ee/protected_branch_spec.rb'
......
......@@ -266,8 +266,8 @@ RSpec.describe Ci::Pipeline do
context 'when builds are retried' do
before do
build_1.update(retried: true)
build_2.update(retried: true)
build_1.update!(retried: true)
build_2.update!(retried: true)
end
it 'does not take retried builds into account' do
......@@ -305,8 +305,8 @@ RSpec.describe Ci::Pipeline do
context 'when builds are retried' do
before do
build.update(retried: true)
build1.update(retried: true)
build.update!(retried: true)
build1.update!(retried: true)
end
it 'does not take retried builds into account' do
......@@ -388,7 +388,7 @@ RSpec.describe Ci::Pipeline do
context 'when pipeline runs on a tag' do
before do
pipeline.update(tag: true)
pipeline.update!(tag: true)
end
context 'when feature is not available' do
......
......@@ -21,7 +21,7 @@ RSpec.describe Ci::Subscriptions::Project do
it { is_expected.to validate_uniqueness_of(:upstream_project_id).scoped_to(:downstream_project_id) }
it 'validates that upstream project is public' do
upstream_project.update(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
upstream_project.update!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
expect(subscription).not_to be_valid
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