Add opengraph and twitter card support to topics

This commit is contained in:
Robin Ward
2013-03-07 17:31:06 -05:00
parent 0bbcd6f7e4
commit d848a9fedc
5 changed files with 45 additions and 4 deletions

View File

@@ -26,6 +26,14 @@ describe TopicView do
lambda { TopicView.new(topic.id, nil) }.should raise_error(Discourse::NotLoggedIn)
end
it "provides an absolute url" do
topic_view.absolute_url.should be_present
end
it "provides a summary of the first post" do
topic_view.summary.should be_present
end
describe "#get_canonical_path" do
let(:user) { Fabricate(:user) }
let(:topic) { Fabricate(:topic) }