about summary refs log tree commit diff
path: root/spec/views/about
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-07-24 17:15:15 +0200
committerGitHub <noreply@github.com>2017-07-24 17:15:15 +0200
commit029f2c4545de617f82c1dfaea3543a9bd75ebcab (patch)
tree252bfd7b341348fcb8fd0c1891fa7fd092b57430 /spec/views/about
parentb3e7beb7c561ca54e8eb43613535ff1350968a99 (diff)
Redesign /terms page (#4338)
* Redesign /terms page

* Fix tests

* Remove unused keys
Diffstat (limited to 'spec/views/about')
-rw-r--r--spec/views/about/_contact.html.haml_spec.rb7
-rw-r--r--spec/views/about/_links.html.haml_spec.rb38
2 files changed, 0 insertions, 45 deletions
diff --git a/spec/views/about/_contact.html.haml_spec.rb b/spec/views/about/_contact.html.haml_spec.rb
index d2e7a4598..25ba15794 100644
--- a/spec/views/about/_contact.html.haml_spec.rb
+++ b/spec/views/about/_contact.html.haml_spec.rb
@@ -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
diff --git a/spec/views/about/_links.html.haml_spec.rb b/spec/views/about/_links.html.haml_spec.rb
deleted file mode 100644
index 2d7f7467a..000000000
--- a/spec/views/about/_links.html.haml_spec.rb
+++ /dev/null
@@ -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