diff options
author | Andrei Bocan <zmaxor@gmail.com> | 2010-11-19 20:25:21 +0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-02-01 19:09:00 -0200 |
commit | 15ad707852159f405e5f6dc61581cb9dbb2864c7 (patch) | |
tree | 6b467e60f713dde0168135cef6b68d0817c9f6c7 /actionpack/test/template/url_helper_test.rb | |
parent | 6dc4538c95b690f61e28f110da24acb5cee62af4 (diff) | |
download | rails-15ad707852159f405e5f6dc61581cb9dbb2864c7.tar.gz rails-15ad707852159f405e5f6dc61581cb9dbb2864c7.tar.bz2 rails-15ad707852159f405e5f6dc61581cb9dbb2864c7.zip |
Allow customization of form class for button_to
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/test/template/url_helper_test.rb')
-rw-r--r-- | actionpack/test/template/url_helper_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index 4a8cea36d4..42232316e8 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -50,6 +50,10 @@ class UrlHelperTest < ActiveSupport::TestCase assert_dom_equal "<form method=\"post\" action=\"http://www.example.com\" class=\"button_to\"><div><input type=\"submit\" value=\"Hello\" /></div></form>", button_to("Hello", "http://www.example.com") end + def test_button_to_with_form_class + assert_dom_equal "<form method=\"post\" action=\"http://www.example.com\" class=\"custom-class\"><div><input type=\"submit\" value=\"Hello\" /></div></form>", button_to("Hello", "http://www.example.com", :form_class => 'custom-class') + end + def test_button_to_with_query assert_dom_equal "<form method=\"post\" action=\"http://www.example.com/q1=v1&q2=v2\" class=\"button_to\"><div><input type=\"submit\" value=\"Hello\" /></div></form>", button_to("Hello", "http://www.example.com/q1=v1&q2=v2") end |