diff options
author | Joel Hawksley <joelhawksley@github.com> | 2019-06-03 08:27:09 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-03 08:27:09 -0600 |
commit | 60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c (patch) | |
tree | 99c9199bf71835f18e2c746b04abe70569e5baed /actionview/test/template | |
parent | a85c372798723b900762c27e62c35689905327aa (diff) | |
parent | c926ca46280aee795b98206dd0707a96b9423cc5 (diff) | |
download | rails-60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c.tar.gz rails-60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c.tar.bz2 rails-60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c.zip |
Merge pull request #2 from rails/master
merge master
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/form_tag_helper_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionview/test/template/form_tag_helper_test.rb b/actionview/test/template/form_tag_helper_test.rb index 9ece9f3ad1..70c5ae6771 100644 --- a/actionview/test/template/form_tag_helper_test.rb +++ b/actionview/test/template/form_tag_helper_test.rb @@ -301,6 +301,13 @@ class FormTagHelperTest < ActionView::TestCase assert_dom_equal expected, actual end + def test_select_tag_with_include_blank_doesnt_change_options + options = { include_blank: true, prompt: "string" } + expected_options = options.dup + select_tag "places", raw("<option>Home</option><option>Work</option><option>Pub</option>"), options + expected_options.each { |k, v| assert_equal v, options[k] } + end + def test_select_tag_with_include_blank_false actual = select_tag "places", raw("<option>Home</option><option>Work</option><option>Pub</option>"), include_blank: false expected = %(<select id="places" name="places"><option>Home</option><option>Work</option><option>Pub</option></select>) |