Commit a8bfe528 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'issue#220040-fix-rails-savebang-admin-controllers' into 'master'

Fix Rails/SaveBang Rubocop offenses for admin controllers

See merge request gitlab-org/gitlab!57644
parents 38ff835f a1d1796b
......@@ -177,9 +177,6 @@ Rails/SaveBang:
- 'qa/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_http_spec.rb'
- 'qa/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_ssh_with_key_spec.rb'
- 'spec/controllers/abuse_reports_controller_spec.rb'
- 'spec/controllers/admin/impersonations_controller_spec.rb'
- 'spec/controllers/admin/runners_controller_spec.rb'
- 'spec/controllers/admin/services_controller_spec.rb'
- 'spec/controllers/boards/issues_controller_spec.rb'
- 'spec/controllers/groups/milestones_controller_spec.rb'
- 'spec/controllers/groups/runners_controller_spec.rb'
......
---
title: Fix Rails/SaveBang Rubocop offenses for admin controllers
merge_request: 57644
author: Huzaifa Iftikhar @huzaifaiftikhar
type: fixed
......@@ -42,7 +42,7 @@ RSpec.describe Admin::ImpersonationsController do
context "when the impersonator is not admin (anymore)" do
before do
impersonator.admin = false
impersonator.save
impersonator.save!
end
it "responds with status 404" do
......
......@@ -125,7 +125,7 @@ RSpec.describe Admin::RunnersController do
describe '#resume' do
it 'marks the runner as active and ticks the queue' do
runner.update(active: false)
runner.update!(active: false)
expect do
post :resume, params: { id: runner.id }
......@@ -140,7 +140,7 @@ RSpec.describe Admin::RunnersController do
describe '#pause' do
it 'marks the runner as inactive and ticks the queue' do
runner.update(active: true)
runner.update!(active: true)
expect do
post :pause, params: { id: runner.id }
......
......@@ -44,7 +44,7 @@ RSpec.describe Admin::ServicesController do
describe "#update" do
let(:project) { create(:project) }
let!(:service_template) do
RedmineService.create(
RedmineService.create!(
project: nil,
active: false,
template: true,
......
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