autolink spec should test that there is an A tag in the markdownified content and that it's href must equal the link that was posted instead of testing all of the markdownified content..
This commit is contained in:
parent
84ff366fef
commit
da851881a7
1 changed files with 7 additions and 1 deletions
|
|
@ -24,7 +24,13 @@ describe MarkdownifyHelper do
|
|||
end
|
||||
|
||||
it 'autolinks standard url links' do
|
||||
markdownify("http://joindiaspora.com/").should match /<p><a href="http:\/\/joindiaspora.com\/">http:\/\/joindiaspora.com\/<\/a><\/p>/
|
||||
markdownified = markdownify("http://joindiaspora.com/")
|
||||
|
||||
doc = Nokogiri.parse(markdownified)
|
||||
|
||||
link = doc.css("a")
|
||||
|
||||
link.attr("href").value.should == "http://joindiaspora.com/"
|
||||
end
|
||||
|
||||
context 'when formatting status messages' do
|
||||
|
|
|
|||
Loading…
Reference in a new issue