diff test/unit/wiki_test.rb @ 119:8661b858af72

* Update to Redmine trunk rev 4705
author Chris Cannam
date Thu, 13 Jan 2011 14:12:06 +0000
parents 513646585e45
children cd2282d2aa55 cbce1fd3b1b7
line wrap: on
line diff
--- a/test/unit/wiki_test.rb	Fri Nov 19 14:05:24 2010 +0000
+++ b/test/unit/wiki_test.rb	Thu Jan 13 14:12:06 2011 +0000
@@ -17,7 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-require File.dirname(__FILE__) + '/../test_helper'
+require File.expand_path('../../test_helper', __FILE__)
 
 class WikiTest < ActiveSupport::TestCase
   fixtures :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions
@@ -39,6 +39,18 @@
     assert_equal "Another start page", @wiki.start_page
   end
   
+  def test_find_page
+    wiki = Wiki.find(1)
+    page = WikiPage.find(2)
+    
+    assert_equal page, wiki.find_page('Another_page')
+    assert_equal page, wiki.find_page('Another page')
+    assert_equal page, wiki.find_page('ANOTHER page')
+    
+    page = WikiPage.find(10)
+    assert_equal page, wiki.find_page('Этика_менеджмента')
+  end
+  
   def test_titleize
     assert_equal 'Page_title_with_CAPITALES', Wiki.titleize('page title with CAPITALES')
     assert_equal 'テスト', Wiki.titleize('テスト')