Commit 22db34b0 authored by Abdul Wadood's avatar Abdul Wadood Committed by Kerri Miller

Fix Rails/SaveBang offenses in ee/spec/mailers

parent 8169fe18
......@@ -60,7 +60,6 @@ Rails/SaveBang:
- 'ee/spec/lib/gitlab/git_access_spec.rb'
- 'ee/spec/lib/gitlab/import_export/group/relation_factory_spec.rb'
- 'ee/spec/lib/gitlab/mirror_spec.rb'
- 'ee/spec/mailers/notify_spec.rb'
- 'ee/spec/models/application_setting_spec.rb'
- 'ee/spec/models/approval_merge_request_rule_spec.rb'
- 'ee/spec/models/approval_project_rule_spec.rb'
......
---
title: Fix Rails/SaveBang rubocop offenses in ee/spec/mailers
merge_request: 58097
author: Abdul Wadood @abdulwd
type: fixed
......@@ -93,8 +93,8 @@ RSpec.describe Notify do
subject { described_class.approved_merge_request_email(recipient.id, merge_request.id, last_approver.id) }
before do
merge_request.approvals.create(user: assignee)
merge_request.approvals.create(user: last_approver)
merge_request.approvals.create!(user: assignee)
merge_request.approvals.create!(user: last_approver)
end
it_behaves_like 'a multiple recipients email'
......@@ -141,7 +141,7 @@ RSpec.describe Notify do
context 'when merge request has no assignee' do
before do
merge_request.update(assignees: [])
merge_request.update!(assignees: [])
end
it 'does not show the assignee' do
......@@ -156,7 +156,7 @@ RSpec.describe Notify do
subject { described_class.unapproved_merge_request_email(recipient.id, merge_request.id, last_unapprover.id) }
before do
merge_request.approvals.create(user: assignee)
merge_request.approvals.create!(user: assignee)
end
it_behaves_like 'a multiple recipients email'
......@@ -209,10 +209,6 @@ RSpec.describe Notify do
subject { described_class.unapproved_merge_request_email(recipient.id, merge_request_without_assignee.id, last_unapprover.id) }
before do
merge_request_without_assignee.approvals.create(user: merge_request_without_assignee.assignees.first)
end
it 'contains the new status' do
is_expected.to have_body_text('unapproved')
end
......
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