From a072f9d7c3bbbbca9c1e6da08a17ae8fc6fdd7a7 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Thu, 11 Jun 2009 01:55:05 -0500 Subject: [PATCH] Test for Bugfix in Revision 399. Update unit tests. --- test/unit/page_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/unit/page_test.rb b/test/unit/page_test.rb index 96fa646e..92fbbc91 100644 --- a/test/unit/page_test.rb +++ b/test/unit/page_test.rb @@ -155,6 +155,16 @@ class PageTest < ActiveSupport::TestCase # assert_equal WikiReference::LINKED_PAGE, references[0].link_type assert_equal 'WantedPage2', references[1].referenced_name 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 Happy Page", + 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 def test_rollback