Skip to content

Commit

Permalink
90 deactivation email clarity (#551)
Browse files Browse the repository at this point in the history
* SRCH-1300 - Change 90 day warning text
  • Loading branch information
peggles2 committed Mar 23, 2020
1 parent 6b07d0c commit e53ab59
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/mailers/emailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def new_feature_adoption_to_admin

def account_deactivation_warning(user, date)
@user = user
@remaining_days = (date - 90.days.ago.to_date).to_i
days_remaining = (date - 90.days.ago.to_date).to_i
@deactivation_date = days_remaining.days.from_now.strftime('%m/%d/%Y')
@user_contact_name = get_contact_name(user)
generic_user_html_email(user, __method__)
end
Expand Down
7 changes: 4 additions & 3 deletions db/email_templates/account_deactivation_warning.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,9 @@
<div style="text-align: left;"><br>
<span style="font-family:helvetica neue,helvetica,arial,verdana,sans-serif">
<p>Hello <%= @user_contact_name %>,</p>
<p> This is a notification to let you know that our system will automatically deactivate your account in the next <%= @remaining_days %> days due to inactivity.</p>
<p>Please log in today to maintain access to your search.gov account.</p>
<p>Search.gov user accounts must be accessed at least once every 90 days to remain active. Please log in before <%= @deactivation_date %>, or your account will automatically be deactivated due to inactivity.
<p>Your search sites will continue to function normally.</p>
<p>Please log in today to maintain access to your Search.gov account.</p>
<p>Thank you!</p>
</span>
</div>
Expand Down Expand Up @@ -741,7 +742,7 @@
<div style="line-height: 20.8px; text-align: center;">
<span style="font-size:12px">
<span style="font-family:helvetica neue,helvetica,arial,verdana,sans-serif">
<span style="line-height:20.8px">You received this message because you have an account&nbsp;on&nbsp;
<span style="line-height:20.8px">You received this message because you have an account on
<a href="https://search.gov" target="_blank">Search.gov</a> that is set to expire soon.&nbsp;
</span><br>
<br>
Expand Down
3 changes: 2 additions & 1 deletion spec/mailers/emailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

describe '.account_deactivation_warning' do
let(:user) { users(:not_active_76_days) }
let(:expected_date) { 14.days.from_now.strftime("%m/%d/%Y") }
let(:message) do
'automatically deactivate your account in the next 14 days due to inactivity.'
"at least once every 90 days to remain active. Please log in before #{expected_date}"
end

subject(:account_deactivation_warning) do
Expand Down

0 comments on commit e53ab59

Please sign in to comment.