aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/javascript_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/javascript_helper_test.rb')
-rw-r--r--actionpack/test/template/javascript_helper_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb
index b98115b652..6cd690e268 100644
--- a/actionpack/test/template/javascript_helper_test.rb
+++ b/actionpack/test/template/javascript_helper_test.rb
@@ -74,7 +74,11 @@ class JavaScriptHelperTest < Test::Unit::TestCase
def test_auto_complete_field
assert_equal %(<script type=\"text/javascript\">new Ajax.Autocompleter('some_input', 'some_input_auto_complete', 'http://www.example.com/autocomplete', {})</script>),
- auto_complete_field("some_input", :url => { :action => "autocomplete" });
+ auto_complete_field("some_input", :url => { :action => "autocomplete" });
+ assert_equal %(<script type=\"text/javascript\">new Ajax.Autocompleter('some_input', 'some_input_auto_complete', 'http://www.example.com/autocomplete', {tokens:','})</script>),
+ auto_complete_field("some_input", :url => { :action => "autocomplete" }, :tokens => ',');
+ assert_equal %(<script type=\"text/javascript\">new Ajax.Autocompleter('some_input', 'some_input_auto_complete', 'http://www.example.com/autocomplete', {tokens:[',']})</script>),
+ auto_complete_field("some_input", :url => { :action => "autocomplete" }, :tokens => [',']);
end
def test_auto_complete_result