2024-08-26 17:53:48 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'rails_helper'
|
|
|
|
|
2024-09-04 07:12:25 +02:00
|
|
|
RSpec.describe 'Home page' do
|
2024-08-26 17:53:48 +02:00
|
|
|
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
|