Add spec for post_page_title for reshares

This commit is contained in:
Steffen van Bergerem 2017-05-03 23:09:30 +02:00 committed by Benjamin Neff
parent fc28d6af35
commit 6dc4493685
No known key found for this signature in database
GPG key ID: 971464C3F1A90194

View file

@ -17,6 +17,13 @@ describe PostsHelper, :type => :helper do
post_page_title(post)
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