mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-11 18:11:32 +00:00
SQLite does not support case insensitive match for non-ASCII characters (#18537).
git-svn-id: http://svn.redmine.org/redmine/trunk@13760 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
24ea953822
commit
261d989431
@ -142,13 +142,21 @@ class SearchTest < ActiveSupport::TestCase
|
||||
assert_equal issue, r.first
|
||||
end
|
||||
|
||||
def test_search_should_be_case_insensitive
|
||||
issue = Issue.generate!(:subject => "AzerTY")
|
||||
|
||||
r = Issue.search_results('AZERty')
|
||||
assert_include issue, r
|
||||
end
|
||||
|
||||
def test_search_should_not_use_ruby_downcase
|
||||
skip "SQLite does not support case insensitive match for non-ASCII characters" if sqlite?
|
||||
issue1 = Issue.generate!(:subject => "Special chars: ÖÖ")
|
||||
issue2 = Issue.generate!(:subject => "Special chars: Öö")
|
||||
Issue.generate!(:subject => "Special chars: oo")
|
||||
Issue.generate!(:subject => "Special chars: OO")
|
||||
|
||||
r = Issue.search_results('%ÖÖ%')
|
||||
r = Issue.search_results('ÖÖ')
|
||||
assert_include issue1, r
|
||||
assert_include issue2, r
|
||||
assert_equal 2, r.size
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user