aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/form_tag_helper_test.rb
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-03-04 02:51:58 -0800
committerGodfrey Chan <godfreykfc@gmail.com>2014-03-04 02:51:58 -0800
commit87d520be16bdfdd1989b51d704800b22f3bb334b (patch)
tree838fb8923af30f8cb08407090c2a37bedba66dc5 /actionview/test/template/form_tag_helper_test.rb
parentffcc6172b4d40ca7c8b02fd298c679b5bcf5787b (diff)
parente447ed6902e0134128728db7baaa48cdf74dc788 (diff)
downloadrails-87d520be16bdfdd1989b51d704800b22f3bb334b.tar.gz
rails-87d520be16bdfdd1989b51d704800b22f3bb334b.tar.bz2
rails-87d520be16bdfdd1989b51d704800b22f3bb334b.zip
Merge pull request #14255 from prikha/master
Fixes #14254 ActionView button_tag helper default options values issue.
Diffstat (limited to 'actionview/test/template/form_tag_helper_test.rb')
-rw-r--r--actionview/test/template/form_tag_helper_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionview/test/template/form_tag_helper_test.rb b/actionview/test/template/form_tag_helper_test.rb
index 0d5831dc6f..cf824e2733 100644
--- a/actionview/test/template/form_tag_helper_test.rb
+++ b/actionview/test/template/form_tag_helper_test.rb
@@ -476,6 +476,11 @@ class FormTagHelperTest < ActionView::TestCase
assert_dom_equal('<button name="temptation" type="button"><strong>Do not press me</strong></button>', output)
end
+ def test_button_tag_defaults_with_block_and_options
+ output = button_tag(:name => 'temptation', :value => 'within') { content_tag(:strong, 'Do not press me') }
+ assert_dom_equal('<button name="temptation" value="within" type="submit" ><strong>Do not press me</strong></button>', output)
+ end
+
def test_button_tag_with_confirmation
assert_dom_equal(
%(<button name="button" type="submit" data-confirm="Are you sure?">Save</button>),