Add create/edit powers to frontend. Support external image URLs.

This commit is contained in:
Tom Preston-Werner
2010-07-07 16:02:26 -07:00
parent 0485c67b3d
commit 6c7fcf89c3
10 changed files with 117 additions and 3 deletions
+10
View File
@@ -32,6 +32,16 @@ context "Markup" do
assert_equal %{<p>a <a class="internal absent" href="J.-R.-R.-Tolkien">J. R. R. Tolkien</a>'s b</p>\n}, output
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)
page = @wiki.page("Bilbo Baggins")
output = Gollum::Markup.new(page).render
assert_equal %{<p>a <img src="#{scheme}://example.com/bilbo.jpg" /> b</p>\n}, output
end
end
test "image with absolute path" do
index = @wiki.repo.index
index.add("alpha.jpg", "hi")