Skip to content

Commit 4d0b002

Browse files
NaraveniSukhpreet-s
authored andcommitted
4788 - Fixing Partner Message On Invite Email (rubyforgood#4805)
1 parent abac329 commit 4d0b002

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

app/views/users/mailer/invitation_instructions.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@
346346
<p>Hello <%= @resource.email %></p>
347347
<% if @resource.partner.present? && is_primary_partner %>
348348
<p>You've been invited to become a partner with <strong><%= organization.name %>!</strong></p>
349+
<p><%= organization.invitation_text %></p>
349350
<p>Please click the link below to accept your invitation and create an account and you'll be able to begin requesting distributions.</p>
350351
<p><strong> Please contact <%= organization.email %> if you are encountering any issues. </strong></p>
351352
<% elsif @resource.partner.present? && !is_primary_partner %>

docs/user_guide/bank/getting_started_customization.md

+2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ Hello [Partner's email]
115115

116116
You've been invited to become a partner with Pawnee Diaper Bank!
117117

118+
[Customer Partner Invitation Message If Present]
119+
118120
Please click the link below to accept your invitation and create an account and you'll be able to begin requesting Distributions.
119121

120122
Please contact [Bank's email] if you are encountering any issues.

spec/mailers/custom_devise_mailer_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
let(:partner) do
88
partner = create(:partner, :uninvited)
99
partner.primary_user.delete
10+
partner.organization.update!(invitation_text: "Custom Invitation Text")
1011
partner.reload
1112
partner
1213
end
@@ -17,6 +18,7 @@
1718

1819
it "invites to primary user" do
1920
expect(mail.subject).to eq("You've been invited to be a partner with #{user.partner.organization.name}")
21+
expect(mail.html_part.body).to include(partner.organization.invitation_text)
2022
expect(mail.html_part.body).to include("You've been invited to become a partner with <strong>#{user.partner.organization.name}!</strong>")
2123
end
2224
end

0 commit comments

Comments
 (0)