Skip to content

Commit

Permalink
Make sure resend email verification redirect to the correct page
Browse files Browse the repository at this point in the history
  • Loading branch information
karenc committed Dec 2, 2015
1 parent 52aa1c6 commit 45dfe3e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/contact_infos_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def toggle_is_searchable
def resend_confirmation
handle_with(ContactInfosResendConfirmation,
complete: lambda {
path = current_user.is_email_pending? ? verification_sent_path :
profile_path(active_tab: :email)
path = current_user.is_temp? ? verification_sent_path :
profile_path(active_tab: :email)
redirect_to path,
notice: "A verification message has been sent to \"#{
@handler_result.outputs[:contact_info].value}\"" })
Expand Down
1 change: 1 addition & 0 deletions spec/features/user_manages_emails_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
scenario 'success', js: true do
fill_in 'Email address', with: 'user@mysite.com'
click_button 'Add Email address'
expect(page).to have_content('Change Your Password')
expect(page).to have_content(
'A verification message has been sent to "user@mysite.com"')
expect(page).to have_content('user@mysite.com')
Expand Down
1 change: 1 addition & 0 deletions spec/features/user_signs_up_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@

click_on 'Resend Verification'

expect(page).to have_content('Already verified your email address?')
expect(page).to have_content('A verification message has been sent to "testuser@example.com"')
end

Expand Down

0 comments on commit 45dfe3e

Please sign in to comment.