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