The personal finance app for everyone
fix(authentication): Fix issues when users try to logout (#603)
Pablo Porto00a42be5c0bb
diff --git a/app/controllers/concerns/authentication.rb b/app/controllers/concerns/authentication.rbindex 64d0a8c0..01a4f297 100644--- a/app/controllers/concerns/authentication.rb+++ b/app/controllers/concerns/authentication.rb@@ -3,7 +3,7 @@ module Authenticationincluded dobefore_action :authenticate_user!- after_action :set_last_login_at+ after_action :set_last_login_at, if: -> { Current.user }endclass_methods dodiff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rbindex 42eb8460..431da1d5 100644--- a/test/application_system_test_case.rb+++ b/test/application_system_test_case.rb@@ -12,6 +12,9 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCasefill_in "Password", with: "password"click_button "Log in"end- assert_text "Dashboard"+ assert_text "Dashboard", wait: 5+ find('[data-controller="menu"]').click+ click_button "Logout"+ assert_text "Sign in to your account"endend