Redesign /terms page (#4338)
* Redesign /terms page * Fix tests * Remove unused keys
This commit is contained in:
parent
b3e7beb7c5
commit
029f2c4545
37 changed files with 22 additions and 180 deletions
|
@ -31,12 +31,5 @@ describe 'about/_contact.html.haml' do
|
|||
|
||||
expect(rendered).to have_content('admin@example.com')
|
||||
end
|
||||
|
||||
it 'does not show info when email is missing' do
|
||||
contact = double(site_contact_email: nil, contact_account: nil)
|
||||
render 'about/contact', contact: contact
|
||||
|
||||
expect(rendered).not_to have_content(I18n.t('about.business_email'))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'about/_links.html.haml' do
|
||||
context 'when signed in' do
|
||||
before do
|
||||
allow(view).to receive(:user_signed_in?).and_return(true)
|
||||
end
|
||||
|
||||
it 'does not show sign in link' do
|
||||
render 'about/links', instance: InstancePresenter.new
|
||||
|
||||
expect(rendered).to have_content(I18n.t('about.get_started'))
|
||||
expect(rendered).not_to have_content(I18n.t('auth.login'))
|
||||
end
|
||||
end
|
||||
|
||||
context 'when signed out' do
|
||||
before do
|
||||
allow(view).to receive(:user_signed_in?).and_return(false)
|
||||
end
|
||||
|
||||
it 'shows get started link when registrations are allowed' do
|
||||
render 'about/links', instance: double(open_registrations: true)
|
||||
|
||||
expect(rendered).to have_content(I18n.t('about.get_started'))
|
||||
expect(rendered).to have_content(I18n.t('auth.login'))
|
||||
end
|
||||
|
||||
it 'hides get started link when registrations are closed' do
|
||||
render 'about/links', instance: double(open_registrations: false)
|
||||
|
||||
expect(rendered).not_to have_content(I18n.t('about.get_started'))
|
||||
expect(rendered).to have_content(I18n.t('auth.login'))
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue