Commit 0a6b560b authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'jswain_almost_there_bug' into 'master'

Bugfix: avoid 500  when resending confirmation

See merge request gitlab-org/gitlab!64234
parents da3077ac c793f4db
......@@ -13,7 +13,7 @@ class ConfirmationsController < Devise::ConfirmationsController
protected
def after_resending_confirmation_instructions_path_for(resource)
return users_almost_there_path(email: resource.email) unless Feature.enabled?(:soft_email_confirmation)
return users_almost_there_path unless Feature.enabled?(:soft_email_confirmation)
stored_location_for(resource) || dashboard_projects_path
end
......
......@@ -128,6 +128,20 @@ RSpec.describe 'Login' do
end
end
end
context 'when resending the confirmation email' do
it 'redirects to the "almost there" page' do
stub_feature_flags(soft_email_confirmation: false)
user = create(:user)
visit new_user_confirmation_path
fill_in 'user_email', with: user.email
click_button 'Resend'
expect(current_path).to eq users_almost_there_path
end
end
end
describe 'with the ghost user' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment