Skip to content

Commit

Permalink
4788 - Fixing Partner Message On Invite Email (#4805)
Browse files Browse the repository at this point in the history
  • Loading branch information
Naraveni authored Nov 28, 2024
1 parent 884b73a commit c9fad26
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/views/users/mailer/invitation_instructions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@
<p>Hello <%= @resource.email %></p>
<% if @resource.partner.present? && is_primary_partner %>
<p>You've been invited to become a partner with <strong><%= organization.name %>!</strong></p>
<p><%= organization.invitation_text %></p>
<p>Please click the link below to accept your invitation and create an account and you'll be able to begin requesting distributions.</p>
<p><strong> Please contact <%= organization.email %> if you are encountering any issues. </strong></p>
<% elsif @resource.partner.present? && !is_primary_partner %>
Expand Down
2 changes: 2 additions & 0 deletions docs/user_guide/bank/getting_started_customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ Hello [Partner's email]

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

[Customer Partner Invitation Message If Present]

Please click the link below to accept your invitation and create an account and you'll be able to begin requesting Distributions.

Please contact [Bank's email] if you are encountering any issues.
Expand Down
2 changes: 2 additions & 0 deletions spec/mailers/custom_devise_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
let(:partner) do
partner = create(:partner, :uninvited)
partner.primary_user.delete
partner.organization.update!(invitation_text: "Custom Invitation Text")
partner.reload
partner
end
Expand All @@ -17,6 +18,7 @@

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

0 comments on commit c9fad26

Please sign in to comment.