summaryrefslogtreecommitdiffstats
path: root/test/unit/wiki_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-27 11:14:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-27 11:14:28 +0000
commit97140f6a7828ff3f2eed25de1553a92ee67f4c24 (patch)
tree2a4f5715d5efa379f172a6e6907f917a253d37b7 /test/unit/wiki_test.rb
parent4a6a551d074ce0680540a28f7c393733afa43422 (diff)
downloadredmine-97140f6a7828ff3f2eed25de1553a92ee67f4c24.tar.gz
redmine-97140f6a7828ff3f2eed25de1553a92ee67f4c24.zip
Fixed: Wiki#find_page should not be case sensitive because page title uniqueness is not (#6987).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4430 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/wiki_test.rb')
-rw-r--r--test/unit/wiki_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/wiki_test.rb b/test/unit/wiki_test.rb
index 9303ce784..82a08b4c4 100644
--- a/test/unit/wiki_test.rb
+++ b/test/unit/wiki_test.rb
@@ -39,6 +39,15 @@ class WikiTest < ActiveSupport::TestCase
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')
+ end
+
def test_titleize
assert_equal 'Page_title_with_CAPITALES', Wiki.titleize('page title with CAPITALES')
assert_equal 'テスト', Wiki.titleize('テスト')