Commit 5e56ba94 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'rails-save-bang-32' into 'master'

Fix Rails/SaveBang offenses in spec/requests/api

See merge request gitlab-org/gitlab!41398
parents a3688656 de48d442
...@@ -1135,9 +1135,6 @@ Rails/SaveBang: ...@@ -1135,9 +1135,6 @@ Rails/SaveBang:
- 'spec/requests/api/issues/post_projects_issues_spec.rb' - 'spec/requests/api/issues/post_projects_issues_spec.rb'
- 'spec/requests/api/jobs_spec.rb' - 'spec/requests/api/jobs_spec.rb'
- 'spec/requests/api/labels_spec.rb' - 'spec/requests/api/labels_spec.rb'
- 'spec/requests/api/maven_packages_spec.rb'
- 'spec/requests/api/members_spec.rb'
- 'spec/requests/api/merge_request_diffs_spec.rb'
- 'spec/requests/api/merge_requests_spec.rb' - 'spec/requests/api/merge_requests_spec.rb'
- 'spec/requests/api/notes_spec.rb' - 'spec/requests/api/notes_spec.rb'
- 'spec/requests/api/pipeline_schedules_spec.rb' - 'spec/requests/api/pipeline_schedules_spec.rb'
......
---
title: Fix Rails/SaveBang offenses for 3 files
merge_request: 41398
author: Rajendra Kadam
type: other
...@@ -283,7 +283,7 @@ RSpec.describe API::MavenPackages do ...@@ -283,7 +283,7 @@ RSpec.describe API::MavenPackages do
context 'internal project' do context 'internal project' do
before do before do
group.group_member(user).destroy group.group_member(user).destroy!
project.update!(visibility_level: Gitlab::VisibilityLevel::INTERNAL) project.update!(visibility_level: Gitlab::VisibilityLevel::INTERNAL)
end end
......
...@@ -258,8 +258,8 @@ RSpec.describe API::Members do ...@@ -258,8 +258,8 @@ RSpec.describe API::Members do
it 'does not create the member if group level is higher' do it 'does not create the member if group level is higher' do
parent = create(:group) parent = create(:group)
group.update(parent: parent) group.update!(parent: parent)
project.update(group: group) project.update!(group: group)
parent.add_developer(stranger) parent.add_developer(stranger)
post api("/#{source_type.pluralize}/#{source.id}/members", maintainer), post api("/#{source_type.pluralize}/#{source.id}/members", maintainer),
...@@ -272,8 +272,8 @@ RSpec.describe API::Members do ...@@ -272,8 +272,8 @@ RSpec.describe API::Members do
it 'creates the member if group level is lower' do it 'creates the member if group level is lower' do
parent = create(:group) parent = create(:group)
group.update(parent: parent) group.update!(parent: parent)
project.update(group: group) project.update!(group: group)
parent.add_developer(stranger) parent.add_developer(stranger)
post api("/#{source_type.pluralize}/#{source.id}/members", maintainer), post api("/#{source_type.pluralize}/#{source.id}/members", maintainer),
......
...@@ -8,8 +8,8 @@ RSpec.describe API::MergeRequestDiffs, 'MergeRequestDiffs' do ...@@ -8,8 +8,8 @@ RSpec.describe API::MergeRequestDiffs, 'MergeRequestDiffs' do
let!(:project) { merge_request.target_project } let!(:project) { merge_request.target_project }
before do before do
merge_request.merge_request_diffs.create(head_commit_sha: '6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9') merge_request.merge_request_diffs.create!(head_commit_sha: '6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9')
merge_request.merge_request_diffs.create(head_commit_sha: '5937ac0a7beb003549fc5fd26fc247adbce4a52e') merge_request.merge_request_diffs.create!(head_commit_sha: '5937ac0a7beb003549fc5fd26fc247adbce4a52e')
project.add_maintainer(user) project.add_maintainer(user)
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