Fix broken contact link in email (#19858)

* Contact us info update

* Update contact info in other emails

* Spec update
This commit is contained in:
Jerin K C 2023-08-02 20:16:09 +05:30 committed by GitHub
parent d1a2fd1e6c
commit 3f67baa2f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 5 deletions

View file

@ -7,7 +7,8 @@
</p>
<p>
<%= t("contact_prompts.if_we_can_help_html") %> 😊
Contact us at <a href="mailto:<%= ForemInstance.contact_email %>"><%= ForemInstance.contact_email %></a>
if there is anything more we can help with.
</p>
<p>

View file

@ -8,7 +8,8 @@
</p>
<p>
<%= t("contact_prompts.if_we_can_help_html") %> 😊
Contact us at <a href="mailto:<%= ForemInstance.contact_email %>"><%= ForemInstance.contact_email %></a>
if there is anything more we can help with.
</p>
<p>

View file

@ -1,6 +1,7 @@
Hi <%= @name %>,
Your account deletion was requested. Please, visit this page: <%= user_confirm_destroy_url(@token) %> to destroy your account. The link will expire in 12 hours.
<%= t("contact_prompts.if_we_can_help_html") %>
Contact us at <%= ForemInstance.contact_email %> if there is anything more we can help with.
Thanks,
The <%= community_name %> Team

View file

@ -7,7 +7,8 @@
</p>
<p>
<%= t("contact_prompts.if_we_can_help_html") %> 😊
Contact us at <a href="mailto:<%= ForemInstance.contact_email %>"><%= ForemInstance.contact_email %></a>
if there is anything more we can help with.
</p>
<p>

View file

@ -2,7 +2,7 @@ Hi <%= @name %>.
Your organization <%= @org_name %> on <%= community_name %> has been successfully deleted.
<%= t("contact_prompts.if_we_can_help_html") %>
Contact us at <%= ForemInstance.contact_email %> if there is anything more we can help with.
Thanks,
The <%= community_name %> Team

View file

@ -7,6 +7,7 @@ RSpec.describe NotifyMailer do
let(:organization) { create(:organization) }
let(:organization_membership) { create(:organization_membership, user: user, organization: organization) }
let(:comment) { create(:comment, user_id: user.id, commentable: article) }
let(:token) { "secret" }
describe "#new_reply_email" do
let(:email) { described_class.with(comment: comment).new_reply_email }
@ -331,6 +332,22 @@ RSpec.describe NotifyMailer do
it "renders proper receiver" do
expect(email.to).to eq([user.email])
end
it "includes contact email" do
expect(email.html_part.body).to include(ForemInstance.contact_email)
end
end
describe "#account_deletion_requested_email" do
let(:email) do
described_class.with(user: user, token: token).account_deletion_requested_email
end
include_examples "#renders_proper_email_headers"
it "includes contact email" do
expect(email.html_part.body).to include(ForemInstance.contact_email)
end
end
describe "#organization_deleted_email" do
@ -347,6 +364,10 @@ RSpec.describe NotifyMailer do
it "renders proper receiver" do
expect(email.to).to eq([user.email])
end
it "includes contact email" do
expect(email.html_part.body).to include(ForemInstance.contact_email)
end
end
describe "#export_email" do