diff options
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/account_show_page_spec.rb | 15 | ||||
-rw-r--r-- | spec/requests/localization_spec.rb | 12 |
2 files changed, 6 insertions, 21 deletions
diff --git a/spec/requests/account_show_page_spec.rb b/spec/requests/account_show_page_spec.rb index 4e51cf7ef..e84c46c47 100644 --- a/spec/requests/account_show_page_spec.rb +++ b/spec/requests/account_show_page_spec.rb @@ -3,17 +3,6 @@ require 'rails_helper' describe 'The account show page' do - it 'Has an h-feed with correct number of h-entry objects in it' do - alice = Fabricate(:account, username: 'alice', display_name: 'Alice') - _status = Fabricate(:status, account: alice, text: 'Hello World') - _status2 = Fabricate(:status, account: alice, text: 'Hello World Again') - _status3 = Fabricate(:status, account: alice, text: 'Are You Still There World?') - - get '/@alice' - - expect(h_feed_entries.size).to eq(3) - end - it 'has valid opengraph tags' do alice = Fabricate(:account, username: 'alice', display_name: 'Alice') _status = Fabricate(:status, account: alice, text: 'Hello World') @@ -33,8 +22,4 @@ describe 'The account show page' do def head_section Nokogiri::Slop(response.body).html.head end - - def h_feed_entries - Nokogiri::HTML(response.body).search('.h-feed .h-entry') - 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 |