diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-11-13 22:01:31 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-11-13 22:01:31 +0000 |
commit | ce04c41830d7cc301c7827bfe0c7108815a2bbe6 (patch) | |
tree | 547079ace68123a23d5951d0dee7f0d171c9c799 /test/unit/principal_test.rb | |
parent | 37c590bfef20c6b08e67be96201c150fa1621fca (diff) | |
download | redmine-ce04c41830d7cc301c7827bfe0c7108815a2bbe6.tar.gz redmine-ce04c41830d7cc301c7827bfe0c7108815a2bbe6.zip |
Fixed that Principal#like scope does not work with cyrillic characters and Postgresql (#12349).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10801 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/principal_test.rb')
-rw-r--r-- | test/unit/principal_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/principal_test.rb b/test/unit/principal_test.rb index 6a4aed700..6d06a3105 100644 --- a/test/unit/principal_test.rb +++ b/test/unit/principal_test.rb @@ -1,3 +1,5 @@ +# encoding: utf-8 +# # Redmine - project management software # Copyright (C) 2006-2012 Jean-Philippe Lang # @@ -106,4 +108,11 @@ class PrincipalTest < ActiveSupport::TestCase assert_equal @palmer, results.first end end + + def test_like_scope_with_cyrillic_name + user = User.generate!(:firstname => 'Соболев', :lastname => 'Денис') + results = Principal.like('Собо') + assert_equal 1, results.count + assert_equal user, results.first + end end |