Commit bf27ada5 authored by Peter Leitzen's avatar Peter Leitzen

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

Fix Rails/SaveBang offenses for spec/services/milestones/*

See merge request gitlab-org/gitlab!42775
parents 765155bc 7376f0aa
......@@ -1144,9 +1144,6 @@ Rails/SaveBang:
- 'spec/services/issuable/clone/attributes_rewriter_spec.rb'
- 'spec/services/issuable/common_system_notes_service_spec.rb'
- 'spec/services/labels/promote_service_spec.rb'
- 'spec/services/milestones/destroy_service_spec.rb'
- 'spec/services/milestones/promote_service_spec.rb'
- 'spec/services/milestones/transfer_service_spec.rb'
- 'spec/services/notes/create_service_spec.rb'
- 'spec/services/notification_recipients/build_service_spec.rb'
- 'spec/services/notification_service_spec.rb'
......
---
title: Fix Rails/SaveBang offenses for spec files in spec/services/milestones/*
merge_request: 42775
author: Rajendra Kadam
type: other
......@@ -45,7 +45,7 @@ RSpec.describe Milestones::DestroyService do
let(:group_milestone) { create(:milestone, group: group) }
before do
project.update(namespace: group)
project.update!(namespace: group)
group.add_developer(user)
end
......
......@@ -23,7 +23,7 @@ RSpec.describe Milestones::PromoteService do
end
it 'raises error if project does not belong to a group' do
project.update(namespace: user.namespace)
project.update!(namespace: user.namespace)
expect { service.execute(milestone) }.to raise_error(described_class::PromoteMilestoneError)
end
......
......@@ -23,7 +23,7 @@ RSpec.describe Milestones::TransferService do
new_group.add_maintainer(user)
project.add_maintainer(user)
# simulate project transfer
project.update(group: new_group)
project.update!(group: new_group)
end
context 'without existing milestone at the new group level' do
......
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