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
This commit is contained in:
Go MAEDA
2018-04-07 06:39:57 +00:00
parent e5a8bcfd72
commit b4a703ce4e
2 changed files with 21 additions and 6 deletions

View File

@@ -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('Собо')