Redirect to root to avoid changing the path by default

This commit is contained in:
Jorge Manrubia
2025-11-05 19:00:50 +01:00
parent 2af7a9f402
commit 693c0c0fb2
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ class LandingsController < ApplicationController
if Current.user.boards.one?
redirect_to board_path(Current.user.boards.first)
else
redirect_to events_path
redirect_to root_path
end
end
end
+2 -2
View File
@@ -7,13 +7,13 @@ class LandingsControllerTest < ActionDispatch::IntegrationTest
test "redirects to the timeline when many boards" do
get landing_path
assert_redirected_to events_path
assert_redirected_to root_path
end
test "redirects to the timeline when no boards" do
Board.destroy_all
get landing_path
assert_redirected_to events_path
assert_redirected_to root_path
end
test "redirects to boards when only one board" do