about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/auth/registrations_controller.rb4
-rw-r--r--spec/controllers/auth/registrations_controller_spec.rb4
2 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/auth/registrations_controller.rb b/app/controllers/auth/registrations_controller.rb
index 60eb9905a..6ce4984bb 100644
--- a/app/controllers/auth/registrations_controller.rb
+++ b/app/controllers/auth/registrations_controller.rb
@@ -23,6 +23,10 @@ class Auth::RegistrationsController < Devise::RegistrationsController
     new_user_session_path
   end
 
+  def after_inactive_sign_up_path_for(_resource)
+    new_user_session_path
+  end
+
   def check_single_user_mode
     redirect_to root_path if Rails.configuration.x.single_user_mode
   end
diff --git a/spec/controllers/auth/registrations_controller_spec.rb b/spec/controllers/auth/registrations_controller_spec.rb
index f7ebebbcb..27ad6cbde 100644
--- a/spec/controllers/auth/registrations_controller_spec.rb
+++ b/spec/controllers/auth/registrations_controller_spec.rb
@@ -20,8 +20,8 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
       post :create, params: { user: { account_attributes: { username: 'test' }, email: 'test@example.com', password: '12345678', password_confirmation: '12345678' } }
     end
 
-    it 'redirects to home page' do
-      expect(response).to redirect_to root_path
+    it 'redirects to login page' do
+      expect(response).to redirect_to new_user_session_path
     end
 
     it 'creates user' do