]> cat aescling's git repositories - mastodon.git/commitdiff
Fix broken spec for about/links view partial (#2586)
authorMatt Jankowski <mjankowski@thoughtbot.com>
Fri, 28 Apr 2017 14:45:24 +0000 (10:45 -0400)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 28 Apr 2017 14:45:24 +0000 (16:45 +0200)
app/views/about/_links.html.haml
app/views/about/more.html.haml
spec/views/about/_links.html.haml_spec.rb

index f85a3407ea9b3766e72ba0b5c1e8fd219b3056af..fb3350539ea5924dc182ba7a06a0df4906dd3fcc 100644 (file)
@@ -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
index ab5b21850f5433e3e6e343a010a0c439845ebd3f..55580f99672f44b95df72a00fa3654936920aea3 100644 (file)
@@ -29,5 +29,5 @@
 
     .sidebar
       = render 'contact', contact: @instance_presenter
-      = render 'links'
+      = render 'links', instance: @instance_presenter
       = render 'version', version: @instance_presenter
index 5026fd8f80dd7894e218546dda5738f63791a5ec..a5d2c89244def56042c12bc3f676db3d6bb9aa8b 100644 (file)
@@ -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'))