about summary refs log tree commit diff
path: root/spec/views/about/_links.html.haml_spec.rb
diff options
context:
space:
mode:
authorOndřej Hruška <ondra@ondrovo.com>2017-07-25 21:36:22 +0200
committerOndřej Hruška <ondra@ondrovo.com>2017-07-25 21:36:22 +0200
commit7e5691804d4f0019a89b8b8a3dad532bc9d940ea (patch)
tree84c2f4e4ac07bea3915639a50df84eb62b6c5768 /spec/views/about/_links.html.haml_spec.rb
parent852acbd7385a640d9e00e462d58a847851744034 (diff)
parent7232cdf7e8249f79078005931b1165e54e413fa9 (diff)
Merge git://github.com/tootsuite/mastodon into tootsuite-master
Diffstat (limited to 'spec/views/about/_links.html.haml_spec.rb')
-rw-r--r--spec/views/about/_links.html.haml_spec.rb38
1 files changed, 0 insertions, 38 deletions
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