Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 11:17:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 11:17:02 +0300
commitb39512ed755239198a9c294b6a45e65c05900235 (patch)
treed234a3efade1de67c46b9e5a38ce813627726aa7 /spec/services/notification_service_spec.rb
parentd31474cf3b17ece37939d20082b07f6657cc79a9 (diff)
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'spec/services/notification_service_spec.rb')
-rw-r--r--spec/services/notification_service_spec.rb45
1 files changed, 3 insertions, 42 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb
index 98fe8a40c61..935dcef1011 100644
--- a/spec/services/notification_service_spec.rb
+++ b/spec/services/notification_service_spec.rb
@@ -2006,19 +2006,19 @@ RSpec.describe NotificationService, :mailer do
context 'participating' do
it_behaves_like 'participating by assignee notification' do
- let(:participant) { create(:user, username: 'user-participant')}
+ let(:participant) { create(:user, username: 'user-participant') }
let(:issuable) { merge_request }
let(:notification_trigger) { notification.new_merge_request(merge_request, @u_disabled) }
end
it_behaves_like 'participating by note notification' do
- let(:participant) { create(:user, username: 'user-participant')}
+ let(:participant) { create(:user, username: 'user-participant') }
let(:issuable) { merge_request }
let(:notification_trigger) { notification.new_merge_request(merge_request, @u_disabled) }
end
context 'by author' do
- let(:participant) { create(:user, username: 'user-participant')}
+ let(:participant) { create(:user, username: 'user-participant') }
before do
merge_request.author = participant
@@ -2657,45 +2657,6 @@ RSpec.describe NotificationService, :mailer do
let(:notification_trigger) { notification.review_requested_of_merge_request(merge_request, current_user, reviewer) }
end
end
-
- describe '#attention_requested_of_merge_request' do
- let_it_be(:current_user) { create(:user) }
- let_it_be(:reviewer) { create(:user) }
- let_it_be(:merge_request) { create(:merge_request, source_project: project, reviewers: [reviewer]) }
-
- it 'sends email to reviewer', :aggregate_failures do
- notification.attention_requested_of_merge_request(merge_request, current_user, reviewer)
-
- merge_request.reviewers.each { |reviewer| should_email(reviewer) }
- should_not_email(merge_request.author)
- should_not_email(@u_watcher)
- should_not_email(@u_participant_mentioned)
- should_not_email(@subscriber)
- should_not_email(@watcher_and_subscriber)
- should_not_email(@u_guest_watcher)
- should_not_email(@u_guest_custom)
- should_not_email(@u_custom_global)
- should_not_email(@unsubscriber)
- should_not_email(@u_participating)
- should_not_email(@u_disabled)
- should_not_email(@u_lazy_participant)
- end
-
- it 'adds "attention requested" reason' do
- notification.attention_requested_of_merge_request(merge_request, current_user, [reviewer])
-
- merge_request.reviewers.each do |reviewer|
- email = find_email_for(reviewer)
-
- expect(email).to have_header('X-GitLab-NotificationReason', NotificationReason::ATTENTION_REQUESTED)
- end
- end
-
- it_behaves_like 'project emails are disabled' do
- let(:notification_target) { merge_request }
- let(:notification_trigger) { notification.attention_requested_of_merge_request(merge_request, current_user, reviewer) }
- end
- end
end
describe 'Projects', :deliver_mails_inline do