Support external links.

This commit is contained in:
Tom Preston-Werner
2010-07-20 22:44:39 -05:00
parent 8221bd6321
commit 9e917e235a
2 changed files with 15 additions and 4 deletions
+7
View File
@@ -63,6 +63,13 @@ context "Markup" do
end
end
test "external page link" do
@wiki.write_page("Bilbo Baggins", :markdown, "a [[http://example.com]] b", @commit)
page = @wiki.page("Bilbo Baggins")
assert_equal "<p>a <a href=\"http://example.com\">http://example.com</a> b</p>", page.formatted_data
end
test "image with http url" do
['http', 'https'].each do |scheme|
@wiki.write_page("Bilbo Baggins", :markdown, "a [[#{scheme}://example.com/bilbo.jpg]] b", @commit)