diff options
author | Sergey Prikhodko <prikha@gmail.com> | 2014-03-03 12:23:51 +0400 |
---|---|---|
committer | Sergey Prikhodko <prikha@gmail.com> | 2014-03-03 12:23:51 +0400 |
commit | 60bbbce7a302c18d3ab8b7450f94cabc9bbea835 (patch) | |
tree | 4c874755d234ad75d368e62d00f6b6058eba0c07 /actionview/test | |
parent | 1d298bd6217d6c0feb3aa698d65289b92b11ab8d (diff) | |
download | rails-60bbbce7a302c18d3ab8b7450f94cabc9bbea835.tar.gz rails-60bbbce7a302c18d3ab8b7450f94cabc9bbea835.tar.bz2 rails-60bbbce7a302c18d3ab8b7450f94cabc9bbea835.zip |
fixes default attributes for button_tag
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/form_tag_helper_test.rb | 5 |
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>), |