Add a new setting to choose the server landing page (#36588)
This commit is contained in:
@@ -23,5 +23,41 @@ RSpec.describe 'Home page' do
|
||||
.to have_css('noscript', text: /Mastodon/)
|
||||
.and have_css('body', class: 'app-body')
|
||||
end
|
||||
|
||||
context 'when the landing page is set to about' do
|
||||
before do
|
||||
Setting.landing_page = 'about'
|
||||
end
|
||||
|
||||
it 'visits the root path and is redirected to the about page', :js do
|
||||
visit root_path
|
||||
|
||||
expect(page).to have_current_path('/about')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the landing page is set to trends' do
|
||||
before do
|
||||
Setting.landing_page = 'trends'
|
||||
end
|
||||
|
||||
it 'visits the root path and is redirected to the trends page', :js do
|
||||
visit root_path
|
||||
|
||||
expect(page).to have_current_path('/explore')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the landing page is set to local_feed' do
|
||||
before do
|
||||
Setting.landing_page = 'local_feed'
|
||||
end
|
||||
|
||||
it 'visits the root path and is redirected to the local live feed page', :js do
|
||||
visit root_path
|
||||
|
||||
expect(page).to have_current_path('/public/local')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user