diff options
author | Tarmo Tänav <tarmo@itech.ee> | 2008-10-06 17:35:21 +0300 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-10-07 00:12:20 +0100 |
commit | 51b986619d88f7ba98be7d271188785cbbb541a0 (patch) | |
tree | e0fbc752ec252c8a1bef0a5cd96db9a3dd999fa3 /actionpack/test | |
parent | 8e50f0f96ef53ee8cc7ffa86ce0e71cc357b2b6c (diff) | |
download | rails-51b986619d88f7ba98be7d271188785cbbb541a0.tar.gz rails-51b986619d88f7ba98be7d271188785cbbb541a0.tar.bz2 rails-51b986619d88f7ba98be7d271188785cbbb541a0.zip |
Implement submit_to_remote as a wrapper around a more generic button_to_remote
Removed the "return false" from submit_to_remote onclick end as
button input elements have no default behavior to cancel.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/prototype_helper_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb index a1f541fd7b..d6b86a3964 100644 --- a/actionpack/test/template/prototype_helper_test.rb +++ b/actionpack/test/template/prototype_helper_test.rb @@ -218,9 +218,9 @@ class PrototypeHelperTest < PrototypeHelperBaseTest end - def test_button_to_remote - assert_dom_equal %(<input name=\"More beer!\" onclick=\"new Ajax.Updater('empty_bottle', 'http://www.example.com/', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this.form)}); return false;\" type=\"button\" value=\"1000000\" />), - button_to_remote("More beer!", 1_000_000, :update => "empty_bottle") + def test_submit_to_remote + assert_dom_equal %(<input name=\"More beer!\" onclick=\"new Ajax.Updater('empty_bottle', 'http://www.example.com/', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this.form)});\" type=\"button\" value=\"1000000\" />), + submit_to_remote("More beer!", 1_000_000, :update => "empty_bottle") end def test_observe_field |