mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 16:28:08 +01:00
27 lines
619 B
Ruby
27 lines
619 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.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/)
|
|
.and have_css('body', class: 'app-body')
|
|
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/)
|
|
.and have_css('body', class: 'app-body')
|
|
end
|
|
end
|
|
end
|