Loading Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ * Redirect to sign in page when a background request fails with 401 [#6496](https://github.com/diaspora/diaspora/pull/6496) * Correctly skip setting sidekiq logfile on Heroku [#6500](https://github.com/diaspora/diaspora/pull/6500) * Fix notifications for interactions by non-contacts [#6498](https://github.com/diaspora/diaspora/pull/6498) * Fix issue where the publisher was broken on profile pages [#6503](https://github.com/diaspora/diaspora/pull/6503) ## Features Loading app/views/people/show.html.haml +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ .stream_container -if user_signed_in? && current_page?(person_path(current_user.person)) - if user_signed_in? && current_user.person == @person = render 'publisher/publisher', publisher_aspects_for(nil) #main_stream.stream Loading spec/integration/profile_spec.rb 0 → 100644 +72 −0 Original line number Diff line number Diff line require "spec_helper" require "requests_helper" describe PeopleController, type: :request do context "for the current user" do before do login alice end it "displays the publisher for user profile path" do get "/u/#{alice.username}" expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) expect(response.body).to match(/div id='publisher_textarea_wrapper'/) end it "displays the publisher for people path" do get "/people/#{alice.person.guid}" expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) expect(response.body).to match(/div id='publisher_textarea_wrapper'/) end end context "for another user" do before do login bob end it "doesn't display the publisher for user profile path" do get "/u/#{alice.username}" expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) expect(response.body).not_to match(/div id='publisher_textarea_wrapper'/) end it "doesn't display the publisher for people path" do get "/people/#{alice.person.guid}" expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) expect(response.body).not_to match(/div id='publisher_textarea_wrapper'/) end end context "with no user signed in" do it "doesn't display the publisher for user profile path" do get "/u/#{alice.username}" expect(response.status).to eq(200) # make sure we aren't signed in expect(response.body).to match(/a class="login"/) expect(response.body).not_to match(/div id='publisher_textarea_wrapper'/) end it "doesn't display the publisher for people path" do get "/people/#{alice.person.guid}" expect(response.status).to eq(200) # make sure we aren't signed in expect(response.body).to match(/a class="login"/) expect(response.body).not_to match(/div id='publisher_textarea_wrapper'/) end end end spec/requests_helper.rb 0 → 100644 +5 −0 Original line number Diff line number Diff line include Warden::Test::Helpers def login(user) login_as user, scope: :user end Loading
Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ * Redirect to sign in page when a background request fails with 401 [#6496](https://github.com/diaspora/diaspora/pull/6496) * Correctly skip setting sidekiq logfile on Heroku [#6500](https://github.com/diaspora/diaspora/pull/6500) * Fix notifications for interactions by non-contacts [#6498](https://github.com/diaspora/diaspora/pull/6498) * Fix issue where the publisher was broken on profile pages [#6503](https://github.com/diaspora/diaspora/pull/6503) ## Features Loading
app/views/people/show.html.haml +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ .stream_container -if user_signed_in? && current_page?(person_path(current_user.person)) - if user_signed_in? && current_user.person == @person = render 'publisher/publisher', publisher_aspects_for(nil) #main_stream.stream Loading
spec/integration/profile_spec.rb 0 → 100644 +72 −0 Original line number Diff line number Diff line require "spec_helper" require "requests_helper" describe PeopleController, type: :request do context "for the current user" do before do login alice end it "displays the publisher for user profile path" do get "/u/#{alice.username}" expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) expect(response.body).to match(/div id='publisher_textarea_wrapper'/) end it "displays the publisher for people path" do get "/people/#{alice.person.guid}" expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) expect(response.body).to match(/div id='publisher_textarea_wrapper'/) end end context "for another user" do before do login bob end it "doesn't display the publisher for user profile path" do get "/u/#{alice.username}" expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) expect(response.body).not_to match(/div id='publisher_textarea_wrapper'/) end it "doesn't display the publisher for people path" do get "/people/#{alice.person.guid}" expect(response.status).to eq(200) # make sure we are signed in expect(response.body).not_to match(/a class="login"/) expect(response.body).not_to match(/div id='publisher_textarea_wrapper'/) end end context "with no user signed in" do it "doesn't display the publisher for user profile path" do get "/u/#{alice.username}" expect(response.status).to eq(200) # make sure we aren't signed in expect(response.body).to match(/a class="login"/) expect(response.body).not_to match(/div id='publisher_textarea_wrapper'/) end it "doesn't display the publisher for people path" do get "/people/#{alice.person.guid}" expect(response.status).to eq(200) # make sure we aren't signed in expect(response.body).to match(/a class="login"/) expect(response.body).not_to match(/div id='publisher_textarea_wrapper'/) end end end
spec/requests_helper.rb 0 → 100644 +5 −0 Original line number Diff line number Diff line include Warden::Test::Helpers def login(user) login_as user, scope: :user end