summaryrefslogtreecommitdiffstats
path: root/test/unit/wiki_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-06-20 06:50:28 +0000
committerGo MAEDA <maeda@farend.jp>2020-06-20 06:50:28 +0000
commit925fbe92633a0484f04d06ec7cdaf7ca88f0c354 (patch)
tree981c425938faf16ad6f5795cad7d112dea85d4a5 /test/unit/wiki_test.rb
parentba6ef9b5b6ea8ba13b24ec8df63b0ef19324f3d2 (diff)
downloadredmine-925fbe92633a0484f04d06ec7cdaf7ca88f0c354.tar.gz
redmine-925fbe92633a0484f04d06ec7cdaf7ca88f0c354.zip
Ordering wiki pages should not be case sensitive (#31287).
Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@19831 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/wiki_test.rb')
-rw-r--r--test/unit/wiki_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/wiki_test.rb b/test/unit/wiki_test.rb
index cc7ba95aa..0f3e5a27d 100644
--- a/test/unit/wiki_test.rb
+++ b/test/unit/wiki_test.rb
@@ -52,6 +52,16 @@ class WikiTest < ActiveSupport::TestCase
assert_equal page, wiki.find_page('ANOTHER page')
end
+ def test_ordering_pages_should_not_be_case_sensitive
+ wiki = Wiki.find(1)
+ wiki.pages.destroy_all
+ %w(ABc ACd Aac Acc).each do |title|
+ wiki.pages.create(:title => title)
+ end
+ wiki.reload
+ assert_equal %w(Aac ABc Acc ACd), wiki.pages.pluck(:title)
+ end
+
def test_find_page_with_cyrillic_characters
wiki = Wiki.find(1)
page = WikiPage.find(10)