diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-09 07:25:58 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-09 07:25:58 +0000 |
commit | 46110aa689412816d077b1f248a6cdb4d9552eda (patch) | |
tree | ae5bf81893ad2434388fcaf07fb003d558159981 /actionpack/test | |
parent | 079d8f402893dae8607bb7e272a6a038b840b4d2 (diff) | |
download | rails-46110aa689412816d077b1f248a6cdb4d9552eda.tar.gz rails-46110aa689412816d077b1f248a6cdb4d9552eda.tar.bz2 rails-46110aa689412816d077b1f248a6cdb4d9552eda.zip |
Fixed JavascriptHelper#auto_complete_for to only include unique items #2153 [Thomas Fuchs]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2159 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/javascript_helper_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb index 15e98654f0..46242355b3 100644 --- a/actionpack/test/template/javascript_helper_test.rb +++ b/actionpack/test/template/javascript_helper_test.rb @@ -127,6 +127,10 @@ class JavaScriptHelperTest < Test::Unit::TestCase auto_complete_result(result, :title) assert_equal %(<ul><li>t<strong class=\"highlight\">est</strong>1</li><li>t<strong class=\"highlight\">est</strong>2</li></ul>), auto_complete_result(result, :title, "est") + + resultuniq = [ { :title => 'test1' }, { :title => 'test1' } ] + assert_equal %(<ul><li>t<strong class=\"highlight\">est</strong>1</li></ul>), + auto_complete_result(resultuniq, :title, "est") end def test_text_field_with_auto_complete |