aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-10-24 18:02:19 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-10-24 18:02:19 -0200
commit6c570648ad93180f35a3c5a096d191871ee06546 (patch)
treebd80f46695b40b1902f75cfdf02e5523142cc7e6 /actionview/test
parent074c155bf60fa4b68db8b7253e1fa8077b4f2fe7 (diff)
parente6e0579defcfcf94ef1c4c1c7659f374a5335cdb (diff)
downloadrails-6c570648ad93180f35a3c5a096d191871ee06546.tar.gz
rails-6c570648ad93180f35a3c5a096d191871ee06546.tar.bz2
rails-6c570648ad93180f35a3c5a096d191871ee06546.zip
Merge pull request #10471 from andyw8/button_to_params
Add params option for button_to Conflicts: actionpack/CHANGELOG.md
Diffstat (limited to 'actionview/test')
-rw-r--r--actionview/test/template/url_helper_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionview/test/template/url_helper_test.rb b/actionview/test/template/url_helper_test.rb
index e3440915a4..deba33510a 100644
--- a/actionview/test/template/url_helper_test.rb
+++ b/actionview/test/template/url_helper_test.rb
@@ -161,6 +161,13 @@ class UrlHelperTest < ActiveSupport::TestCase
)
end
+ def test_button_to_with_params
+ assert_dom_equal(
+ %{<form action="http://www.example.com" class="button_to" method="post"><div><input type="submit" value="Hello" /><input type="hidden" name="foo" value="bar" /><input type="hidden" name="baz" value="quux" /></div></form>},
+ button_to("Hello", "http://www.example.com", params: {foo: :bar, baz: "quux"})
+ )
+ 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