Wiki links to files point to the appropriate actions (file, pic)
This commit is contained in:
parent
c30989c7eb
commit
e6c32bafc6
6 changed files with 47 additions and 34 deletions
|
@ -76,6 +76,6 @@ class WikiTest < Test::Unit::TestCase
|
|||
assert_equal expected_link_text, chunk.link_text
|
||||
assert_equal expected_link_type, chunk.link_type
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -210,6 +210,18 @@ class RevisionTest < Test::Unit::TestCase
|
|||
"today</ins></p>", @page.revisions.last.display_diff
|
||||
end
|
||||
|
||||
def test_link_to_file
|
||||
assert_markup_parsed_as(
|
||||
'<p><span class="newWikiWord">doc.pdf<a href="../file/doc.pdf">?</a></span></p>',
|
||||
'[[doc.pdf:file]]')
|
||||
end
|
||||
|
||||
def test_link_to_pic
|
||||
assert_markup_parsed_as(
|
||||
'<p><span class="newWikiWord">Square<a href="../pic/square.jpg">?</a></span></p>',
|
||||
'[[square.jpg|Square:pic]]')
|
||||
end
|
||||
|
||||
# TODO Remove the leading underscores from this test when upgrading to RedCloth 3.0.1;
|
||||
# also add a test for the "Unhappy Face" problem (another interesting RedCloth bug)
|
||||
def __test_list_with_tildas
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue