diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-05-30 13:33:32 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-05-30 13:33:32 -0700 |
commit | fd97266a3f684bf1d41f702251fcb69ad9bd6dda (patch) | |
tree | 67608320ffc575a2e53a85dbfa992e2654d8d057 /actionpack/test/template/url_helper_test.rb | |
parent | aab0d4e2c67df1bf05ddcb2b90bee8e5dfea5909 (diff) | |
parent | ab7a80ea22c94a006788eddfa3b92123b4031cb6 (diff) | |
download | rails-fd97266a3f684bf1d41f702251fcb69ad9bd6dda.tar.gz rails-fd97266a3f684bf1d41f702251fcb69ad9bd6dda.tar.bz2 rails-fd97266a3f684bf1d41f702251fcb69ad9bd6dda.zip |
Merge pull request #6556 from lest/patch-1
accept a block in button_to helper
Diffstat (limited to 'actionpack/test/template/url_helper_test.rb')
-rw-r--r-- | actionpack/test/template/url_helper_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index fb5b35bac6..365a86ab91 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -144,6 +144,13 @@ class UrlHelperTest < ActiveSupport::TestCase ) end + def test_button_to_with_block + assert_dom_equal( + "<form method=\"post\" action=\"http://www.example.com\" class=\"button_to\"><div><button type=\"submit\"><span>Hello</span></button></div></form>", + button_to("http://www.example.com") { content_tag(:span, 'Hello') } + ) + end + def test_link_tag_with_straight_url assert_dom_equal "<a href=\"http://www.example.com\">Hello</a>", link_to("Hello", "http://www.example.com") end |