Commit a0dd86b9 authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Rémy Coutable

Fix Rails/SaveBang offenses for spec/requests/api/*

Fixes Rails/SaveBang cop for spec files
parent b7539aa1
...@@ -1172,9 +1172,6 @@ Rails/SaveBang: ...@@ -1172,9 +1172,6 @@ Rails/SaveBang:
- 'spec/presenters/ci/build_runner_presenter_spec.rb' - 'spec/presenters/ci/build_runner_presenter_spec.rb'
- 'spec/presenters/ci/trigger_presenter_spec.rb' - 'spec/presenters/ci/trigger_presenter_spec.rb'
- 'spec/presenters/packages/conan/package_presenter_spec.rb' - 'spec/presenters/packages/conan/package_presenter_spec.rb'
- 'spec/requests/api/access_requests_spec.rb'
- 'spec/requests/api/boards_spec.rb'
- 'spec/requests/api/branches_spec.rb'
- 'spec/requests/api/ci/runner_spec.rb' - 'spec/requests/api/ci/runner_spec.rb'
- 'spec/requests/api/commit_statuses_spec.rb' - 'spec/requests/api/commit_statuses_spec.rb'
- 'spec/requests/api/conan_packages_spec.rb' - 'spec/requests/api/conan_packages_spec.rb'
......
---
title: Fix Rails/SaveBang offenses for spec/requests/api/*
merge_request: 41362
author: Rajendra Kadam
type: fixed
...@@ -90,7 +90,7 @@ RSpec.describe API::AccessRequests do ...@@ -90,7 +90,7 @@ RSpec.describe API::AccessRequests do
context 'when authenticated as a stranger' do context 'when authenticated as a stranger' do
context "when access request is disabled for the #{source_type}" do context "when access request is disabled for the #{source_type}" do
before do before do
source.update(request_access_enabled: false) source.update!(request_access_enabled: false)
end end
it 'returns 403' do it 'returns 403' do
......
...@@ -41,7 +41,7 @@ RSpec.describe API::Boards do ...@@ -41,7 +41,7 @@ RSpec.describe API::Boards do
it 'creates a new issue board list for group labels' do it 'creates a new issue board list for group labels' do
group = create(:group) group = create(:group)
group_label = create(:group_label, group: group) group_label = create(:group_label, group: group)
board_parent.update(group: group) board_parent.update!(group: group)
post api(url, user), params: { label_id: group_label.id } post api(url, user), params: { label_id: group_label.id }
...@@ -54,7 +54,7 @@ RSpec.describe API::Boards do ...@@ -54,7 +54,7 @@ RSpec.describe API::Boards do
group = create(:group) group = create(:group)
sub_group = create(:group, parent: group) sub_group = create(:group, parent: group)
group_label = create(:group_label, group: group) group_label = create(:group_label, group: group)
board_parent.update(group: sub_group) board_parent.update!(group: sub_group)
group.add_developer(user) group.add_developer(user)
sub_group.add_developer(user) sub_group.add_developer(user)
......
...@@ -181,7 +181,7 @@ RSpec.describe API::Branches do ...@@ -181,7 +181,7 @@ RSpec.describe API::Branches do
context 'when unauthenticated', 'and project is public' do context 'when unauthenticated', 'and project is public' do
before do before do
project.update(visibility_level: Gitlab::VisibilityLevel::PUBLIC) project.update!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
end end
it_behaves_like 'repository branches' it_behaves_like 'repository branches'
...@@ -289,7 +289,7 @@ RSpec.describe API::Branches do ...@@ -289,7 +289,7 @@ RSpec.describe API::Branches do
context 'when unauthenticated', 'and project is public' do context 'when unauthenticated', 'and project is public' do
before do before do
project.update(visibility_level: Gitlab::VisibilityLevel::PUBLIC) project.update!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
end end
it_behaves_like 'repository branch' it_behaves_like 'repository branch'
......
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