-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2553 from alphagov/email-copy-updates
Email copy updates
- Loading branch information
Showing
10 changed files
with
34 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
Someone has invited you to <%= t('department.name') %> Signon, you can accept it through the link below. | ||
Your GOV.UK Signon account is ready. | ||
|
||
<%= accept_invitation_url(@user, invitation_token: @token) %> | ||
[Set your password to finish creating your account](<%= accept_invitation_url(@user, invitation_token: @token) %>) and get access to GOV.UK publishing apps. | ||
|
||
If you don't want to accept the invitation, please ignore this email. | ||
This link will expire in 2 weeks. | ||
|
||
Your account won't be created until you access the link above and set your password. | ||
|
||
If you do not access the link within two weeks, it will expire. | ||
Ignore this email if you no longer need a Signon account to publish or view data about GOV.UK content. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
Someone has requested a link to change your password. You can do this through the link below. | ||
Someone has asked to reset your Signon password. | ||
|
||
<%= edit_password_url(@user, :reset_password_token => @token) %> | ||
[Reset your password.](<%= edit_password_url(@user, :reset_password_token => @token) %>) | ||
|
||
If you didn't request this, please ignore this email. | ||
This link will expire in 6 hours. You can only use it once. | ||
|
||
Your password won't change until you access the link above and create a new one. | ||
|
||
The link will be valid for 6 hours and will only work once. | ||
If you did not ask to reset your password, you can ignore this email.You can sign in using your current password. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,7 +147,7 @@ def assert_user_created_and_invited(email, application, organisation: nil) | |
assert_equal "[email protected]", invite_email.from[0] | ||
assert_nil invite_email.reply_to | ||
|
||
assert_match "Please confirm your account", invite_email.subject | ||
assert_match I18n.t("devise.mailer.invitation_instructions.subject"), invite_email.subject | ||
end | ||
|
||
def assert_user_not_created(email) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,13 +54,13 @@ class EmailChangeTest < ActionDispatch::IntegrationTest | |
user = User.invite!(name: "Jim", email: "[email protected]") | ||
|
||
open_email("[email protected]") | ||
assert_equal "Please confirm your account", current_email.subject | ||
assert_equal I18n.t("devise.mailer.invitation_instructions.subject"), current_email.subject | ||
|
||
visit new_user_session_path | ||
signin_with(@admin) | ||
admin_changes_email_address(user:, new_email: "[email protected]") | ||
|
||
email = emails_sent_to("[email protected]").detect { |mail| mail.subject == "Please confirm your account" } | ||
email = emails_sent_to("[email protected]").detect { |mail| mail.subject == I18n.t("devise.mailer.invitation_instructions.subject") } | ||
assert email | ||
assert email.body.include?("/users/invitation/accept?invitation_token=") | ||
assert user.accept_invitation! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,7 @@ class InvitingUsersTest < ActionDispatch::IntegrationTest | |
click_button "Create user and send email" | ||
|
||
assert_equal "[email protected]", last_email.to[0] | ||
assert_match "Please confirm your account", last_email.subject | ||
assert_match I18n.t("devise.mailer.invitation_instructions.subject"), last_email.subject | ||
|
||
assert has_field?("Mandate 2-step verification for this user") | ||
check "Mandate 2-step verification for this user" | ||
|
@@ -94,7 +94,7 @@ class InvitingUsersTest < ActionDispatch::IntegrationTest | |
|
||
assert_not_nil User.where(email: "[email protected]", role: "normal").last | ||
assert_equal "[email protected]", last_email.to[0] | ||
assert_match "Please confirm your account", last_email.subject | ||
assert_match I18n.t("devise.mailer.invitation_instructions.subject"), last_email.subject | ||
assert_equal false, User.where(email: "[email protected]", role: "normal").last.require_2sv? | ||
end | ||
end | ||
|
@@ -114,7 +114,7 @@ class InvitingUsersTest < ActionDispatch::IntegrationTest | |
|
||
assert_not_nil User.where(email: "[email protected]", role: "normal").last | ||
assert_equal "[email protected]", last_email.to[0] | ||
assert_match "Please confirm your account", last_email.subject | ||
assert_match I18n.t("devise.mailer.invitation_instructions.subject"), last_email.subject | ||
assert User.where(email: "[email protected]", role: "normal").last.require_2sv? | ||
end | ||
end | ||
|
@@ -136,7 +136,7 @@ class InvitingUsersTest < ActionDispatch::IntegrationTest | |
click_button "Resend signup email" | ||
|
||
assert page.has_content?("Resent account signup email") | ||
emails_received = all_emails.count { |email| email.subject == "Please confirm your account" } | ||
emails_received = all_emails.count { |email| email.subject == I18n.t("devise.mailer.invitation_instructions.subject") } | ||
assert_equal 2, emails_received | ||
end | ||
end | ||
|
@@ -219,7 +219,7 @@ class InvitingUsersTest < ActionDispatch::IntegrationTest | |
click_button "Create user and send email" | ||
|
||
assert_equal "[email protected]", last_email.to[0] | ||
assert_match "Please confirm your account", last_email.subject | ||
assert_match I18n.t("devise.mailer.invitation_instructions.subject"), last_email.subject | ||
|
||
assert has_field?("Mandate 2-step verification for this user") | ||
check "Mandate 2-step verification for this user" | ||
|
@@ -252,7 +252,7 @@ class InvitingUsersTest < ActionDispatch::IntegrationTest | |
|
||
assert_not_nil User.where(email: "[email protected]", role: Roles::Superadmin.role_name).last | ||
assert_equal "[email protected]", last_email.to[0] | ||
assert_match "Please confirm your account", last_email.subject | ||
assert_match I18n.t("devise.mailer.invitation_instructions.subject"), last_email.subject | ||
assert User.where(email: "[email protected]", role: Roles::Superadmin.role_name).last.require_2sv? | ||
end | ||
end | ||
|
@@ -268,7 +268,7 @@ class InvitingUsersTest < ActionDispatch::IntegrationTest | |
|
||
assert_not_nil User.where(email: "[email protected]", role: Roles::Admin.role_name).last | ||
assert_equal "[email protected]", last_email.to[0] | ||
assert_match "Please confirm your account", last_email.subject | ||
assert_match I18n.t("devise.mailer.invitation_instructions.subject"), last_email.subject | ||
assert User.where(email: "[email protected]", role: Roles::Admin.role_name).last.require_2sv? | ||
end | ||
end | ||
|
@@ -290,7 +290,7 @@ class InvitingUsersTest < ActionDispatch::IntegrationTest | |
|
||
assert_not_nil User.where(email: "[email protected]", role: Roles::Superadmin.role_name).last | ||
assert_equal "[email protected]", last_email.to[0] | ||
assert_match "Please confirm your account", last_email.subject | ||
assert_match I18n.t("devise.mailer.invitation_instructions.subject"), last_email.subject | ||
assert User.where(email: "[email protected]", role: Roles::Superadmin.role_name).last.require_2sv? | ||
end | ||
end | ||
|
@@ -306,7 +306,7 @@ class InvitingUsersTest < ActionDispatch::IntegrationTest | |
|
||
assert_not_nil User.where(email: "[email protected]", role: Roles::Admin.role_name).last | ||
assert_equal "[email protected]", last_email.to[0] | ||
assert_match "Please confirm your account", last_email.subject | ||
assert_match I18n.t("devise.mailer.invitation_instructions.subject"), last_email.subject | ||
assert User.where(email: "[email protected]", role: Roles::Admin.role_name).last.require_2sv? | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,7 @@ class BatchInvitationTest < ActiveSupport::TestCase | |
|
||
email = ActionMailer::Base.deliveries.last | ||
assert_not_nil email | ||
assert_equal "Please confirm your account", email.subject | ||
assert_equal I18n.t("devise.mailer.invitation_instructions.subject"), email.subject | ||
assert_equal ["[email protected]"], email.to | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters