aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-03-19 15:47:35 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-03-19 15:47:35 -0300
commita1d042bea1d3b6d2e41356b3240e3e146823c19b (patch)
tree889a28325bc0707856c8558aedfa8a73e47d624c
parentaeb0391cc100b4ccddf3ffd1d87866f7e8a4f8e6 (diff)
parent01d39787ed6e7d8f51545f2604edcdce66ec221e (diff)
downloadrails-a1d042bea1d3b6d2e41356b3240e3e146823c19b.tar.gz
rails-a1d042bea1d3b6d2e41356b3240e3e146823c19b.tar.bz2
rails-a1d042bea1d3b6d2e41356b3240e3e146823c19b.zip
Merge pull request #19417 from akshay-vishnoi/test-correct
[Fix Select tag Tests] Test correct use of multiple option for select tag
-rw-r--r--actionview/test/template/form_tag_helper_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionview/test/template/form_tag_helper_test.rb b/actionview/test/template/form_tag_helper_test.rb
index 84a581b107..cad1c82309 100644
--- a/actionview/test/template/form_tag_helper_test.rb
+++ b/actionview/test/template/form_tag_helper_test.rb
@@ -210,13 +210,13 @@ class FormTagHelperTest < ActionView::TestCase
end
def test_select_tag_with_multiple
- actual = select_tag "colors", "<option>Red</option><option>Blue</option><option>Green</option>".html_safe, :multiple => :true
- expected = %(<select id="colors" multiple="multiple" name="colors"><option>Red</option><option>Blue</option><option>Green</option></select>)
+ actual = select_tag "colors", "<option>Red</option><option>Blue</option><option>Green</option>".html_safe, multiple: true
+ expected = %(<select id="colors" multiple="multiple" name="colors[]"><option>Red</option><option>Blue</option><option>Green</option></select>)
assert_dom_equal expected, actual
end
def test_select_tag_disabled
- actual = select_tag "places", "<option>Home</option><option>Work</option><option>Pub</option>".html_safe, :disabled => :true
+ actual = select_tag "places", "<option>Home</option><option>Work</option><option>Pub</option>".html_safe, disabled: true
expected = %(<select id="places" disabled="disabled" name="places"><option>Home</option><option>Work</option><option>Pub</option></select>)
assert_dom_equal expected, actual
end
@@ -352,7 +352,7 @@ class FormTagHelperTest < ActionView::TestCase
end
def test_text_field_disabled
- actual = text_field_tag "title", "Hello!", :disabled => :true
+ actual = text_field_tag "title", "Hello!", disabled: true
expected = %(<input id="title" name="title" disabled="disabled" type="text" value="Hello!" />)
assert_dom_equal expected, actual
end