Commit 1a93ccd5 authored by Jonne Haß's avatar Jonne Haß Committed by Florian Staudacher

don't error out if the root of a reshare of a reshare got deleted, fixes #3546

parent 6ba10a4a
......@@ -30,6 +30,10 @@
* Fix javascripts error in invitations facebox. [#3638](
* Fix css overflow problem in aspect dropdown on welcome page. [#3637](
Fix exception when the root of a reshare of a reshare got deleted [#3546](
* Fix syntax error in French Javascript pluralization rule.
......@@ -63,7 +63,7 @@ class PostPresenter
def root, current_user).as_json if @post.respond_to?(:root) && @post.root.present?, current_user).as_json if @post.respond_to?(:absolute_root) && @post.absolute_root.present?
def user_like
......@@ -44,6 +44,16 @@ describe PostPresenter do
describe '#root' do
it 'does not raise if the absolute_root does not exists' do
first_reshare = FactoryGirl.create :reshare
first_reshare.root = nil
reshare = FactoryGirl.create :reshare, :root => first_reshare
expect {
}.to_not raise_error
it 'does not raise if the root does not exists' do
reshare = FactoryGirl.create:reshare
reshare.root = nil
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment