Merge branch 'stable' into develop
This commit is contained in:
commit
480384a077
4 changed files with 23 additions and 0 deletions
|
|
@ -79,6 +79,7 @@ With the port to Bootstrap 3, app/views/terms/default.haml has a new structure.
|
|||
* Fix mobile photos index page [#6243](https://github.com/diaspora/diaspora/pull/6243)
|
||||
* Fix conversations view with no contacts [#6266](https://github.com/diaspora/diaspora/pull/6266)
|
||||
* Links in the left sidebar are now clickable on full width [#6267](https://github.com/diaspora/diaspora/pull/6267)
|
||||
* Guard against passing nil into person\_image\_tag [#6286](https://github.com/diaspora/diaspora/pull/6286)
|
||||
|
||||
## Features
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ module PeopleHelper
|
|||
end
|
||||
|
||||
def person_image_tag(person, size = :thumb_small)
|
||||
return "" if person.nil? || person.profile.nil?
|
||||
image_tag(person.profile.image_url(size), alt: person.name, class: "avatar img-responsive center-block",
|
||||
title: person.name, "data-person_id" => person.id)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -117,6 +117,24 @@ describe NotificationsController, :type => :controller do
|
|||
expect(assigns[:notifications].count).to eq(1)
|
||||
end
|
||||
end
|
||||
|
||||
context "after deleting a person" do
|
||||
before do
|
||||
user = FactoryGirl.create(:user_with_aspect)
|
||||
user.share_with(alice.person, user.aspects.first)
|
||||
user.person.delete
|
||||
end
|
||||
|
||||
it "succeeds" do
|
||||
get :index
|
||||
expect(response).to be_success
|
||||
end
|
||||
|
||||
it "succeeds on mobile" do
|
||||
get :index, format: :mobile
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#read_all" do
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ describe PeopleHelper, :type => :helper do
|
|||
end
|
||||
|
||||
describe "#person_image_tag" do
|
||||
it "returns an empty string if person is nil" do
|
||||
expect(person_image_tag(nil)).to eq("")
|
||||
end
|
||||
it "should not allow basic XSS/HTML" do
|
||||
@person.profile.first_name = "I'm <h1>Evil"
|
||||
@person.profile.last_name = "I'm <h1>Evil"
|
||||
|
|
|
|||
Loading…
Reference in a new issue