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:
authorFrank van Rest <frank@dedact.nl>2019-04-19 21:10:52 +0300
committerAlexandru Croitor <acroitor@gitlab.com>2019-06-21 13:48:43 +0300
commitdf4c1a75dec4da15c38066ca73312ed91baeb782 (patch)
tree9e288e1f2bfd26a32a56b4a227bc2f7a52d3b852 /spec/mailers
parent4298a28a993363f4ab6b63c14820492393a3ae94 (diff)
Uniform html and text emails
Uniform new_issue_email html and text emails Uniform note_email html and text emails Uniform new_merge_request_email html and text emails
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/notify_spec.rb28
1 files changed, 9 insertions, 19 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index cbbb22ad78c..11af6837dab 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -99,15 +99,9 @@ describe Notify do
end
end
- context 'when enabled email_author_in_body' do
- before do
- stub_application_setting(email_author_in_body: true)
- end
-
- it 'contains a link to note author' do
- is_expected.to have_body_text(issue.author_name)
- is_expected.to have_body_text 'created an issue:'
- end
+ it 'contains a link to issue author' do
+ is_expected.to have_body_text(issue.author_name)
+ is_expected.to have_body_text 'created an issue:'
end
end
@@ -314,15 +308,9 @@ describe Notify do
end
end
- context 'when enabled email_author_in_body' do
- before do
- stub_application_setting(email_author_in_body: true)
- end
-
- it 'contains a link to note author' do
- is_expected.to have_body_text merge_request.author_name
- is_expected.to have_body_text 'created a merge request:'
- end
+ it 'contains a link to merge request author' do
+ is_expected.to have_body_text merge_request.author_name
+ is_expected.to have_body_text 'created a merge request:'
end
end
@@ -907,7 +895,9 @@ describe Notify do
end
it 'contains an introduction' do
- is_expected.to have_body_text 'started a new discussion'
+ issuable_url = "project_#{note.noteable_type.underscore}_url"
+
+ is_expected.to have_body_text "started a new <a href=\"#{public_send(issuable_url, project, note.noteable, anchor: "note_#{note.id}")}\">discussion</a>"
end
context 'when a comment on an existing discussion' do