summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Jankowski <matt@jankowski.online>2024-03-18 04:55:54 -0400
committerGitHub <noreply@github.com>2024-03-18 08:55:54 +0000
commit92855948a000563f1a6d715721892dfc18606baf (patch)
tree502cebdf9bc898c6fd8510019434f19f5f5ba24a
parentecdbf15ebef3bae688528b347fec50583c6cc04d (diff)
Remove unused `show_landing_strip?` helper method (#29618)
-rw-r--r--app/helpers/application_helper.rb4
-rw-r--r--spec/helpers/application_helper_spec.rb30
-rw-r--r--spec/views/statuses/show.html.haml_spec.rb2
3 files changed, 1 insertions, 35 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a4f92743c58..18c9663275e 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -32,10 +32,6 @@ module ApplicationHelper
paths.any? { |path| current_page?(path) } ? 'active' : ''
end
- def show_landing_strip?
- !user_signed_in? && !single_user_mode?
- end
-
def open_registrations?
Setting.registrations_mode == 'open'
end
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index ef1463e64c8..6fc6b3c0877 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -99,36 +99,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
diff --git a/spec/views/statuses/show.html.haml_spec.rb b/spec/views/statuses/show.html.haml_spec.rb
index 233965883a1..92ba678b6d5 100644
--- a/spec/views/statuses/show.html.haml_spec.rb
+++ b/spec/views/statuses/show.html.haml_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
describe 'statuses/show.html.haml', :without_verify_partial_doubles do
before do
- allow(view).to receive_messages(api_oembed_url: '', show_landing_strip?: true, site_title: 'example site', site_hostname: 'example.com', full_asset_url: '//asset.host/image.svg', current_account: nil, single_user_mode?: false)
+ allow(view).to receive_messages(api_oembed_url: '', site_title: 'example site', site_hostname: 'example.com', full_asset_url: '//asset.host/image.svg', current_account: nil, single_user_mode?: false)
allow(view).to receive(:local_time)
allow(view).to receive(:local_time_ago)
assign(:instance_presenter, InstancePresenter.new)