logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 9262f6968becb7f046396b783b60be93073601a8
parent: 71e73e36cde53950e243f458fe5130271b62705e
Author: Matt Jankowski <mjankowski@thoughtbot.com>
Date:   Fri, 28 Apr 2017 10:45:24 -0400

Fix broken spec for about/links view partial (#2586)


Diffstat:

Mapp/views/about/_links.html.haml2+-
Mapp/views/about/more.html.haml2+-
Mspec/views/about/_links.html.haml_spec.rb4++--
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/views/about/_links.html.haml b/app/views/about/_links.html.haml @@ -5,7 +5,7 @@ - if user_signed_in? %li= link_to t('about.get_started'), root_path - else - - if @instance_presenter.open_registrations + - if instance.open_registrations %li= link_to t('about.get_started'), new_user_registration_path %li= link_to t('auth.login'), new_user_session_path %li= link_to t('about.terms'), terms_path diff --git a/app/views/about/more.html.haml b/app/views/about/more.html.haml @@ -29,5 +29,5 @@ .sidebar = render 'contact', contact: @instance_presenter - = render 'links' + = render 'links', instance: @instance_presenter = render 'version', version: @instance_presenter diff --git a/spec/views/about/_links.html.haml_spec.rb b/spec/views/about/_links.html.haml_spec.rb @@ -7,7 +7,7 @@ describe 'about/_links.html.haml' do instance_presenter = double(:instance_presenter, open_registrations: true) assign(:instance_presenter, instance_presenter) allow(view).to receive(:user_signed_in?).and_return(true) - render + 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')) @@ -17,7 +17,7 @@ describe 'about/_links.html.haml' do instance_presenter = double(:instance_presenter, open_registrations: true) assign(:instance_presenter, instance_presenter) allow(view).to receive(:user_signed_in?).and_return(false) - render + render 'about/links', instance: InstancePresenter.new expect(rendered).to have_content(I18n.t('about.get_started')) expect(rendered).to have_content(I18n.t('auth.login'))