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