Merge branch 'MatrixCrawler-4638-Atom-Feed-Error' into develop
This commit is contained in:
commit
3fae96697a
3 changed files with 11 additions and 3 deletions
|
|
@ -20,6 +20,7 @@
|
||||||
* Fix active user statistics by saving a last seen timestamp for users [#4734](https://github.com/diaspora/diaspora/issues/4734)
|
* Fix active user statistics by saving a last seen timestamp for users [#4734](https://github.com/diaspora/diaspora/issues/4734)
|
||||||
* Render HTML in atom user feed [#4835](https://github.com/diaspora/diaspora/pull/4835)
|
* Render HTML in atom user feed [#4835](https://github.com/diaspora/diaspora/pull/4835)
|
||||||
* Fix plaintext mode of Mentionable [#4294](https://github.com/diaspora/diaspora/issues/4294)
|
* Fix plaintext mode of Mentionable [#4294](https://github.com/diaspora/diaspora/issues/4294)
|
||||||
|
* Fixed Atom Feed Error if reshared Post is deleted [#4638] (https://github.com/diaspora/diaspora/issues/4638)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
* You can report a single post by clicking the correct icon in the controler section [#4517](https://github.com/diaspora/diaspora/pull/4517)
|
* You can report a single post by clicking the correct icon in the controler section [#4517](https://github.com/diaspora/diaspora/pull/4517)
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,8 @@ atom_feed({'xmlns:thr' => 'http://purl.org/syndication/thread/1.0',
|
||||||
author.tag! 'poco:displayName', @user.name
|
author.tag! 'poco:displayName', @user.name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@posts.each do |post|
|
@posts.each do |post|
|
||||||
post = post.absolute_root if post.is_a? Reshare
|
post = post.absolute_root unless post.absolute_root.nil? if post.is_a? Reshare
|
||||||
feed.entry post, :url => "#{@user.url}p/#{post.id}",
|
feed.entry post, :url => "#{@user.url}p/#{post.id}",
|
||||||
:id => "#{@user.url}p/#{post.id}" do |entry|
|
:id => "#{@user.url}p/#{post.id}" do |entry|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,13 +53,21 @@ describe UsersController do
|
||||||
get :public, :username => @user.username, :format => :atom
|
get :public, :username => @user.username, :format => :atom
|
||||||
response.body.should include('a href')
|
response.body.should include('a href')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'includes reshares in the atom feed' do
|
it 'includes reshares in the atom feed' do
|
||||||
reshare = FactoryGirl.create(:reshare, :author => @user.person)
|
reshare = FactoryGirl.create(:reshare, :author => @user.person)
|
||||||
get :public, :username => @user.username, :format => :atom
|
get :public, :username => @user.username, :format => :atom
|
||||||
response.body.should include reshare.root.raw_message
|
response.body.should include reshare.root.raw_message
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'do not show reshares in atom feed if origin post is deleted' do
|
||||||
|
post = FactoryGirl.create(:status_message, :public => true);
|
||||||
|
reshare = FactoryGirl.create(:reshare, :root => post, :author => @user.person)
|
||||||
|
post.delete
|
||||||
|
get :public, :username => @user.username, :format => :atom
|
||||||
|
response.code.should == '200'
|
||||||
|
end
|
||||||
|
|
||||||
it 'redirects to a profile page if html is requested' do
|
it 'redirects to a profile page if html is requested' do
|
||||||
get :public, :username => @user.username
|
get :public, :username => @user.username
|
||||||
response.should be_redirect
|
response.should be_redirect
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue