diff options
author | Go MAEDA <maeda@farend.jp> | 2018-04-07 06:39:57 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-04-07 06:39:57 +0000 |
commit | b4a703ce4ea166d855d8e467e0b95a962d762a01 (patch) | |
tree | 3f85e2979971a7884bd9b54b07f2fee9bc6da88b /test | |
parent | e5a8bcfd72de2b4ac5d90a534f3bd927619904a7 (diff) | |
download | redmine-b4a703ce4ea166d855d8e467e0b95a962d762a01.tar.gz redmine-b4a703ce4ea166d855d8e467e0b95a962d762a01.zip |
Support for lastnames with spaces in user autocompleters (#28154).
Patch by Gregor Schmidt.
git-svn-id: http://svn.redmine.org/redmine/trunk@17259 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/principal_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/principal_test.rb b/test/unit/principal_test.rb index 2abd110f9..bb03a088e 100644 --- a/test/unit/principal_test.rb +++ b/test/unit/principal_test.rb @@ -127,6 +127,16 @@ class PrincipalTest < ActiveSupport::TestCase assert_equal User.find(2), results.first end + test "like scope should find lastname with spaces" do + user = User.find(1) + user.update_columns(:firstname => 'Leonardo', :lastname => 'da Vinci') + + results = Principal.like('Leonardo da Vinci') + + assert_equal 1, results.count + assert_equal user, results.first + end + def test_like_scope_with_cyrillic_name user = User.generate!(:firstname => 'Соболев', :lastname => 'Денис') results = Principal.like('Собо') |