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-05-05 15:08:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-05 15:08:03 +0300
commit3c86701bc89302550abb9bbaa060132fdcd52480 (patch)
treeb73328cbd2de6d43afd0eb5253ec215274011dc8 /spec/mailers
parent17ef30f3df6d3939e41e69efc7cfa3deaa08605d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/emails/merge_requests_spec.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/mailers/emails/merge_requests_spec.rb b/spec/mailers/emails/merge_requests_spec.rb
index dea54f7315d..d4dc7a76516 100644
--- a/spec/mailers/emails/merge_requests_spec.rb
+++ b/spec/mailers/emails/merge_requests_spec.rb
@@ -182,6 +182,36 @@ RSpec.describe Emails::MergeRequests do
end
end
+ describe '#approved_merge_request_email' do
+ subject { Notify.approved_merge_request_email(recipient.id, merge_request.id, current_user.id) }
+
+ it 'has the correct body' do
+ aggregate_failures do
+ is_expected.to have_body_text('was approved by')
+ is_expected.to have_body_text(current_user.name)
+ is_expected.to have_text_part_content(assignee.name)
+ is_expected.to have_html_part_content(assignee.name)
+ is_expected.to have_text_part_content(reviewer.name)
+ is_expected.to have_html_part_content(reviewer.name)
+ end
+ end
+ end
+
+ describe '#unapproved_merge_request_email' do
+ subject { Notify.unapproved_merge_request_email(recipient.id, merge_request.id, current_user.id) }
+
+ it 'has the correct body' do
+ aggregate_failures do
+ is_expected.to have_body_text('was unapproved by')
+ is_expected.to have_body_text(current_user.name)
+ is_expected.to have_text_part_content(assignee.name)
+ is_expected.to have_html_part_content(assignee.name)
+ is_expected.to have_text_part_content(reviewer.name)
+ is_expected.to have_html_part_content(reviewer.name)
+ end
+ end
+ end
+
describe "#resolved_all_discussions_email" do
subject { Notify.resolved_all_discussions_email(recipient.id, merge_request.id, current_user.id) }