mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 08:48:53 +00:00
Merge commit 'ffc5be4820ed7bad4656489f096230dd7965140b' into glitch-soc/merge-upstream
Conflicts: - `package.json`: Upstream updated a dependency that is on an adjacent line to a glitch-soc-only dependency in that file. Updated as upstream did. - `yarn.lock`: Upstream updated a dependency that is on an adjacent line to a glitch-soc-only dependency in that file. Updated as upstream did.
This commit is contained in:
@@ -3,30 +3,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe ApplicationHelper do
|
||||
describe 'active_nav_class' do
|
||||
it 'returns active when on the current page' do
|
||||
allow(helper).to receive(:current_page?).and_return(true)
|
||||
|
||||
result = helper.active_nav_class('/test')
|
||||
expect(result).to eq 'active'
|
||||
end
|
||||
|
||||
it 'returns active when on a current page' do
|
||||
allow(helper).to receive(:current_page?).with('/foo').and_return(false)
|
||||
allow(helper).to receive(:current_page?).with('/test').and_return(true)
|
||||
|
||||
result = helper.active_nav_class('/foo', '/test')
|
||||
expect(result).to eq 'active'
|
||||
end
|
||||
|
||||
it 'returns empty string when not on current page' do
|
||||
allow(helper).to receive(:current_page?).and_return(false)
|
||||
|
||||
result = helper.active_nav_class('/test')
|
||||
expect(result).to eq ''
|
||||
end
|
||||
end
|
||||
|
||||
describe 'body_classes' do
|
||||
context 'with a body class string from a controller' do
|
||||
before { helper.extend controller_helpers }
|
||||
@@ -101,36 +77,6 @@ describe ApplicationHelper do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'show_landing_strip?', :without_verify_partial_doubles do
|
||||
describe 'when signed in' do
|
||||
before do
|
||||
allow(helper).to receive(:user_signed_in?).and_return(true)
|
||||
end
|
||||
|
||||
it 'does not show landing strip' do
|
||||
expect(helper.show_landing_strip?).to be false
|
||||
end
|
||||
end
|
||||
|
||||
describe 'when signed out' do
|
||||
before do
|
||||
allow(helper).to receive(:user_signed_in?).and_return(false)
|
||||
end
|
||||
|
||||
it 'does not show landing strip on single user instance' do
|
||||
allow(helper).to receive(:single_user_mode?).and_return(true)
|
||||
|
||||
expect(helper.show_landing_strip?).to be false
|
||||
end
|
||||
|
||||
it 'shows landing strip on multi user instance' do
|
||||
allow(helper).to receive(:single_user_mode?).and_return(false)
|
||||
|
||||
expect(helper.show_landing_strip?).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'available_sign_up_path' do
|
||||
context 'when registrations are closed' do
|
||||
before do
|
||||
|
||||
Reference in New Issue
Block a user