Test for Bugfix in Revision 399.

Update unit tests.
This commit is contained in:
Jacques Distler 2009-06-11 01:55:05 -05:00
parent 48ee59e393
commit a072f9d7c3

View file

@ -155,6 +155,16 @@ class PageTest < ActiveSupport::TestCase
# assert_equal WikiReference::LINKED_PAGE, references[0].link_type # assert_equal WikiReference::LINKED_PAGE, references[0].link_type
assert_equal 'WantedPage2', references[1].referenced_name assert_equal 'WantedPage2', references[1].referenced_name
assert_equal WikiReference::WANTED_PAGE, references[1].link_type assert_equal WikiReference::WANTED_PAGE, references[1].link_type
new_page.revise('Reference to HappyPage', 'NewPage', Time.now, 'AlexeyVerkhovsky',
test_renderer)
references = new_page.wiki_references(true)
assert_match( "Reference to <a class='existingWikiWord' href='\.\./show/MyPage'>Happy Page</a>",
test_renderer(new_page.revisions.last).display_content(true) )
assert_equal 1, references.size
# now it works.
assert_equal 'HappyPage', references[0].referenced_name
assert_equal WikiReference::LINKED_PAGE, references[0].link_type
end end
def test_rollback def test_rollback