Add spec for post_page_title for reshares
This commit is contained in:
parent
fc28d6af35
commit
6dc4493685
1 changed files with 7 additions and 0 deletions
|
|
@ -17,6 +17,13 @@ describe PostsHelper, :type => :helper do
|
||||||
post_page_title(post)
|
post_page_title(post)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "with a reshare" do
|
||||||
|
it "returns 'Reshare by...'" do
|
||||||
|
reshare = FactoryGirl.create(:reshare, author: alice.person)
|
||||||
|
expect(post_page_title(reshare)).to eq I18n.t("posts.show.reshare_by", author: reshare.author_name)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue