diff options
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/emails/merge_requests_spec.rb | 30 |
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) } |