diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb deleted file mode 100644 index 8070b25..0000000 --- a/app/controllers/confirmations_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class ConfirmationsController < Devise::ConfirmationsController - - protected - - def after_confirmation_path_for(resource_name, resource) - root_path - end - -end \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 2f0a5ff..ccb4899 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -32,7 +32,6 @@ devise_for :users, controllers: { registrations: "registrations", - confirmations: 'confirmations', passwords: 'passwords', sessions: 'sessions', omniauth_callbacks: 'users/omniauth_callbacks'} do diff --git a/test/functional/confirmations_controller_test.rb b/test/functional/confirmations_controller_test.rb deleted file mode 100644 index ead70fb..0000000 --- a/test/functional/confirmations_controller_test.rb +++ /dev/null @@ -1,34 +0,0 @@ -require 'test_helper' - -class ConfirmationsControllerTest < ActionDispatch::IntegrationTest - - include Devise::Test::IntegrationHelpers - - test 'make sure the user is redirected to the home page after confirming their email address' do - @user = User.first - @user.confirmed_at = nil - @user.confirmation_token = 'ABCD1234' - @user.confirmation_sent_at = Time.now - @user.save! - - # Make sure invalid token results in - get "#{root_url}/users/confirmation?confirmation_token=ZXYW0987" - assert_response :success - assert_select '.main_page_content h2', _('Resend confirmation instructions') - - get "#{root_url}/users/confirmation?confirmation_token=ABCD1234" - assert_response :redirect - assert_redirected_to root_url - follow_redirects - assert_select '.main_page_content h2', _('Welcome.') - @user.reload - assert_not @user.confirmed_at.nil?, "Expected the confirmed_at value to have been set!" - - # Make sure that we cannot reconfirm again - get "#{root_url}/users/confirmation?confirmation_token=ABCD1234" - assert_response :success - assert_select '.main_page_content h2', _('Resend confirmation instructions') - - end - -end \ No newline at end of file diff --git a/test/functional/registrations_controller_test.rb b/test/functional/registrations_controller_test.rb index 7d8ff90..8976103 100644 --- a/test/functional/registrations_controller_test.rb +++ b/test/functional/registrations_controller_test.rb @@ -64,10 +64,8 @@ assert_redirected_to root_url follow_redirect! - assert_response :success - assert [I18n.t('devise.registrations.user.signed_up_but_unconfirmed'), - I18n.t('devise.registrations.signed_up_but_unconfirmed')].include?(flash[:notice]) - assert_select '.welcome-message h2', _('Welcome.') + assert_response :redirect + assert_redirected_to plans_path cntr += 1 end