mirror of
https://github.com/redmine/redmine.git
synced 2026-07-26 02:30:37 +02:00
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:
@@ -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('Собо')
|
||||
|
||||
Reference in New Issue
Block a user