Skip to content

Commit

Permalink
Change :updated_not_sign_in -> :updated_but_not_signed_in and fix the…
Browse files Browse the repository at this point in the history
… message
  • Loading branch information
knjko committed Oct 11, 2018
1 parent 5e461e9 commit c6e70b0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/devise/registrations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def set_flash_message_for_update(resource, prev_unconfirmed_email)
elsif sign_in_after_change_password?
:updated
else
:updated_not_sign_in
:updated_but_not_signed_in
end
set_flash_message :notice, flash_key
end
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ en:
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
updated: "Your account has been updated successfully."
updated_not_sign_in: "Your password has been changed successfully. please try signing in"
updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again"
sessions:
signed_in: "Signed in successfully."
signed_out: "Signed out successfully."
Expand Down
2 changes: 1 addition & 1 deletion test/integration/registerable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def user_sign_up
fill_in 'current password', with: '12345678'
click_button 'Update'

assert_contain 'Your password has been changed successfully. please try signing in'
assert_contain 'Your account has been updated successfully, but since your password was changed, you need to sign in again'
assert_equal new_user_session_path, @request.path
assert !warden.authenticated?(:user)
end
Expand Down

0 comments on commit c6e70b0

Please sign in to comment.