mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 08:33:41 +01:00
Fix broken spec for about/links view partial (#2586)
This commit is contained in:
parent
71e73e36cd
commit
9262f6968b
3 changed files with 4 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
%li= link_to t('about.get_started'), root_path
|
%li= link_to t('about.get_started'), root_path
|
||||||
- else
|
- 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('about.get_started'), new_user_registration_path
|
||||||
%li= link_to t('auth.login'), new_user_session_path
|
%li= link_to t('auth.login'), new_user_session_path
|
||||||
%li= link_to t('about.terms'), terms_path
|
%li= link_to t('about.terms'), terms_path
|
||||||
|
|
|
@ -29,5 +29,5 @@
|
||||||
|
|
||||||
.sidebar
|
.sidebar
|
||||||
= render 'contact', contact: @instance_presenter
|
= render 'contact', contact: @instance_presenter
|
||||||
= render 'links'
|
= render 'links', instance: @instance_presenter
|
||||||
= render 'version', version: @instance_presenter
|
= render 'version', version: @instance_presenter
|
||||||
|
|
|
@ -7,7 +7,7 @@ describe 'about/_links.html.haml' do
|
||||||
instance_presenter = double(:instance_presenter, open_registrations: true)
|
instance_presenter = double(:instance_presenter, open_registrations: true)
|
||||||
assign(:instance_presenter, instance_presenter)
|
assign(:instance_presenter, instance_presenter)
|
||||||
allow(view).to receive(:user_signed_in?).and_return(true)
|
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).to have_content(I18n.t('about.get_started'))
|
||||||
expect(rendered).not_to have_content(I18n.t('auth.login'))
|
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)
|
instance_presenter = double(:instance_presenter, open_registrations: true)
|
||||||
assign(:instance_presenter, instance_presenter)
|
assign(:instance_presenter, instance_presenter)
|
||||||
allow(view).to receive(:user_signed_in?).and_return(false)
|
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('about.get_started'))
|
||||||
expect(rendered).to have_content(I18n.t('auth.login'))
|
expect(rendered).to have_content(I18n.t('auth.login'))
|
||||||
|
|
Loading…
Reference in a new issue