From 76faacb602056a9f358554a2e59c7ee68e91f16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janko=20Marohni=C4=87?= Date: Thu, 25 Jul 2024 00:54:09 +0200 Subject: [PATCH] Fix tests --- test/rails_app/app/misc/rodauth_main.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/rails_app/app/misc/rodauth_main.rb b/test/rails_app/app/misc/rodauth_main.rb index 3ab31b5..8f00af0 100644 --- a/test/rails_app/app/misc/rodauth_main.rb +++ b/test/rails_app/app/misc/rodauth_main.rb @@ -39,7 +39,12 @@ class RodauthMain < Rodauth::Rails::Auth after_login { remember_login } before_create_account { rails_account.username } - already_logged_in { redirect rails_routes.root_path(rails_request.query_parameters) } + already_logged_in do + if rails_request.query_parameters.any? + redirect rails_routes.root_path(rails_request.query_parameters) + end + end + logout_redirect { rails_routes.root_path } verify_account_redirect { login_redirect } reset_password_redirect { login_path }