diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-10-06 02:19:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-06 02:19:45 +0200 |
commit | 58d5b28cb00ffadfeb7a3e1e03f7ae0d3b0d8486 (patch) | |
tree | 25249ee5319fb69d5ba26c5d7c6c79856c4be1a0 /spec | |
parent | 5fd46dddd7b1d5482c3173c8bcfba0899293307f (diff) |
Remove previous landing page (#19300)
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/about_controller_spec.rb | 22 | ||||
-rw-r--r-- | spec/requests/localization_spec.rb | 12 | ||||
-rw-r--r-- | spec/views/about/show.html.haml_spec.rb | 25 |
3 files changed, 6 insertions, 53 deletions
diff --git a/spec/controllers/about_controller_spec.rb b/spec/controllers/about_controller_spec.rb index 40e395a64..20069e413 100644 --- a/spec/controllers/about_controller_spec.rb +++ b/spec/controllers/about_controller_spec.rb @@ -3,20 +3,6 @@ require 'rails_helper' RSpec.describe AboutController, type: :controller do render_views - describe 'GET #show' do - before do - get :show - end - - it 'assigns @instance_presenter' do - expect(assigns(:instance_presenter)).to be_kind_of InstancePresenter - end - - it 'returns http success' do - expect(response).to have_http_status(200) - end - end - describe 'GET #more' do before do get :more @@ -30,12 +16,4 @@ RSpec.describe AboutController, type: :controller do expect(response).to have_http_status(200) end end - - describe 'helper_method :new_user' do - it 'returns a new User' do - user = @controller.view_context.new_user - expect(user).to be_kind_of User - expect(user.account).to be_kind_of Account - end - end end diff --git a/spec/requests/localization_spec.rb b/spec/requests/localization_spec.rb index 175f02ae9..0bc2786ac 100644 --- a/spec/requests/localization_spec.rb +++ b/spec/requests/localization_spec.rb @@ -10,30 +10,30 @@ describe 'Localization' do it 'uses a specific region when provided' do headers = { 'Accept-Language' => 'zh-HK' } - get "/about", headers: headers + get "/auth/sign_in", headers: headers expect(response.body).to include( - I18n.t('about.tagline', locale: 'zh-HK') + I18n.t('auth.login', locale: 'zh-HK') ) end it 'falls back to a locale when region missing' do headers = { 'Accept-Language' => 'es-FAKE' } - get "/about", headers: headers + get "/auth/sign_in", headers: headers expect(response.body).to include( - I18n.t('about.tagline', locale: 'es') + I18n.t('auth.login', locale: 'es') ) end it 'falls back to english when locale is missing' do headers = { 'Accept-Language' => '12-FAKE' } - get "/about", headers: headers + get "/auth/sign_in", headers: headers expect(response.body).to include( - I18n.t('about.tagline', locale: 'en') + I18n.t('auth.login', locale: 'en') ) end end diff --git a/spec/views/about/show.html.haml_spec.rb b/spec/views/about/show.html.haml_spec.rb deleted file mode 100644 index bf6e19d2b..000000000 --- a/spec/views/about/show.html.haml_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe 'about/show.html.haml', without_verify_partial_doubles: true do - before do - allow(view).to receive(:site_hostname).and_return('example.com') - allow(view).to receive(:site_title).and_return('example site') - allow(view).to receive(:new_user).and_return(User.new) - allow(view).to receive(:use_seamless_external_login?).and_return(false) - allow(view).to receive(:current_account).and_return(nil) - end - - it 'has valid open graph tags' do - assign(:instance_presenter, InstancePresenter.new) - render - - header_tags = view.content_for(:header_tags) - - expect(header_tags).to match(%r{<meta content=".+" property="og:title" />}) - expect(header_tags).to match(%r{<meta content="website" property="og:type" />}) - expect(header_tags).to match(%r{<meta content=".+" property="og:image" />}) - expect(header_tags).to match(%r{<meta content="http://.+" property="og:url" />}) - end -end |