FIX: include topic title and domain name in topic invite mail
This commit is contained in:
parent
c5d3db9148
commit
8395da5bd0
|
@ -24,6 +24,7 @@ class InviteMailer < ActionMailer::Base
|
|||
build_email(invite.email,
|
||||
template: 'invite_mailer',
|
||||
invitee_name: invitee_name,
|
||||
site_domain_name: Discourse.current_hostname,
|
||||
invite_link: "#{Discourse.base_url}/invites/#{invite.invite_key}",
|
||||
topic_title: first_topic.try(:title),
|
||||
topic_excerpt: topic_excerpt,
|
||||
|
|
|
@ -1048,7 +1048,7 @@ en:
|
|||
blocked: "is blocked."
|
||||
|
||||
invite_mailer:
|
||||
subject_template: "%{invitee_name} invited you to a discussion at %{site_name}"
|
||||
subject_template: "%{invitee_name} invited you to '%{topic_title}' on %{site_domain_name}"
|
||||
text_body_template: |
|
||||
%{invitee_name} invited you to a discussion
|
||||
|
||||
|
|
|
@ -42,6 +42,14 @@ describe InviteMailer do
|
|||
expect(invite_mail.subject).to be_present
|
||||
end
|
||||
|
||||
it 'renders topic title in subject' do
|
||||
expect(invite_mail.subject).to match(topic.title)
|
||||
end
|
||||
|
||||
it 'renders site domain name in subject' do
|
||||
expect(invite_mail.subject).to match(Discourse.current_hostname)
|
||||
end
|
||||
|
||||
it 'renders the body' do
|
||||
expect(invite_mail.body).to be_present
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue