diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-26 23:00:31 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-26 23:00:31 -0300 |
commit | ceedec7edcadbad824f58e84bc2c1eddbe8539ce (patch) | |
tree | 4f74cf1de3be2a90102c4b116cc1b6a46e1c9c52 /actionpack/test/template | |
parent | b05819fd28acd069556767a99738a6fd8b0a1965 (diff) | |
download | rails-ceedec7edcadbad824f58e84bc2c1eddbe8539ce.tar.gz rails-ceedec7edcadbad824f58e84bc2c1eddbe8539ce.tar.bz2 rails-ceedec7edcadbad824f58e84bc2c1eddbe8539ce.zip |
Fix collection_radio_buttons with the option `:checked` with value of
`false`
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/form_collections_helper_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/template/form_collections_helper_test.rb b/actionpack/test/template/form_collections_helper_test.rb index c73e80ed88..2131f81396 100644 --- a/actionpack/test/template/form_collections_helper_test.rb +++ b/actionpack/test/template/form_collections_helper_test.rb @@ -149,6 +149,12 @@ class FormCollectionsHelperTest < ActionView::TestCase assert_select 'label[for=post_category_id_2]', 'Category 2' end + test 'collection radio accepts checked item which has a value of false' do + with_collection_radio_buttons :user, :active, [[1, true], [0, false]], :last, :first, :checked => false + assert_no_select 'input[type=radio][value=true][checked=checked]' + assert_select 'input[type=radio][value=false][checked=checked]' + end + # COLLECTION CHECK BOXES test 'collection check boxes accepts a collection and generate a serie of checkboxes for value method' do collection = [Category.new(1, 'Category 1'), Category.new(2, 'Category 2')] |