Commit bcf9ec4c authored by Rémy Coutable's avatar Rémy Coutable

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

Fix Rails/SaveBang offenses in spec/graphql

See merge request gitlab-org/gitlab!57912
parents 5358b4d7 26b53b29
......@@ -153,9 +153,6 @@ Rails/SaveBang:
- 'spec/controllers/sessions_controller_spec.rb'
- 'spec/frontend/fixtures/issues.rb'
- 'spec/frontend/fixtures/merge_requests.rb'
- 'spec/graphql/mutations/merge_requests/set_locked_spec.rb'
- 'spec/graphql/mutations/merge_requests/set_wip_spec.rb'
- 'spec/graphql/resolvers/boards_resolver_spec.rb'
- 'spec/lib/after_commit_queue_spec.rb'
- 'spec/lib/backup/manager_spec.rb'
- 'spec/lib/gitlab/alerting/alert_spec.rb'
......
---
title: Fix Rails/SaveBang rubocop offenses in spec/graphql
merge_request: 57912
author: Abdul Wadood @abdulwd
type: fixed
......@@ -41,7 +41,7 @@ RSpec.describe Mutations::MergeRequests::SetLocked do
let(:locked) { false }
it 'unlocks the discussion' do
merge_request.update(discussion_locked: true)
merge_request.update!(discussion_locked: true)
expect(mutated_merge_request).not_to be_discussion_locked
end
......
......@@ -41,7 +41,7 @@ RSpec.describe Mutations::MergeRequests::SetWip do
let(:wip) { false }
it 'removes `wip` from the title' do
merge_request.update(title: "WIP: working on it")
merge_request.update!(title: "WIP: working on it")
expect(mutated_merge_request).not_to be_work_in_progress
end
......
......@@ -54,7 +54,7 @@ RSpec.describe Resolvers::BoardsResolver do
end
it 'returns nil if board not found' do
outside_parent = create(board_parent.class.underscore.to_sym)
outside_parent = create(board_parent.class.underscore.to_sym) # rubocop:disable Rails/SaveBang
outside_board = create(:board, name: 'outside board', resource_parent: outside_parent)
expect(resolve_boards(args: { id: global_id_of(outside_board) })).to eq Board.none
......
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