Convert "static page" controller specs to system specs (#31599)
This commit is contained in:
25
spec/system/home_spec.rb
Normal file
25
spec/system/home_spec.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'Home page' do
|
||||
context 'when signed in' do
|
||||
before { sign_in Fabricate(:user) }
|
||||
|
||||
it 'visits the homepage and renders the web app' do
|
||||
visit root_path
|
||||
|
||||
expect(page)
|
||||
.to have_css('noscript', text: /Mastodon/)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when not signed in' do
|
||||
it 'visits the homepage and renders the web app' do
|
||||
visit root_path
|
||||
|
||||
expect(page)
|
||||
.to have_css('noscript', text: /Mastodon/)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user