FIX: Post does not save if it contains a tag link

This commit is contained in:
Sam
2016-05-02 11:36:09 +10:00
parent ad2a3ec5bc
commit d25dc126f7
2 changed files with 13 additions and 1 deletions

View File

@ -421,4 +421,15 @@ HTML
end
end
describe "tag and category links" do
it "produces tag links" do
# TODO where is our tags table?
TopicCustomField.create!(topic_id: 1, name: DiscourseTagging::TAGS_FIELD_NAME, value: "known")
# TODO does it make sense to generate hashtags for tags that are missing in action?
expect(PrettyText.cook(" #unknown::tag #known::tag")).to match_html("<p> <span class=\"hashtag\">#unknown::tag</span> <a class=\"hashtag\" href=\"http://test.localhost/tags/known\">#<span>known</span></a></p>")
end
end
end