Commit e1e45517 authored by Abdul Wadood's avatar Abdul Wadood

Fix Rails/SaveBang offenses in spec/graphql

Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/220040.
parent 5401b3e8
......@@ -159,9 +159,6 @@ Rails/SaveBang:
- 'spec/factories_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'
......
......@@ -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)
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