Redirect to root to avoid changing the path by default
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user