diff options
author | Timm <kaspth@gmail.com> | 2014-05-27 16:27:52 +0200 |
---|---|---|
committer | Timm <kaspth@gmail.com> | 2014-06-16 21:04:25 +0200 |
commit | 01ff0f311ec928b7019c8498956d80579ec256b5 (patch) | |
tree | d3f2413d49d4fb20946ce189548a2641a6bf28ee /actionview/test/template | |
parent | bcd71b4c9ad746ac1f49fb2adea6836f16852960 (diff) | |
download | rails-01ff0f311ec928b7019c8498956d80579ec256b5.tar.gz rails-01ff0f311ec928b7019c8498956d80579ec256b5.tar.bz2 rails-01ff0f311ec928b7019c8498956d80579ec256b5.zip |
Fix invalid css selectors in form_collections_helper_test.rb.
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/form_collections_helper_test.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/actionview/test/template/form_collections_helper_test.rb b/actionview/test/template/form_collections_helper_test.rb index b94e153fe6..b193d387c3 100644 --- a/actionview/test/template/form_collections_helper_test.rb +++ b/actionview/test/template/form_collections_helper_test.rb @@ -225,14 +225,14 @@ class FormCollectionsHelperTest < ActionView::TestCase collection = [Category.new(1, 'Category 1'), Category.new(2, 'Category 2')] with_collection_check_boxes :user, :category_ids, collection, :id, :name, { index: 322 } - assert_select "input[type=hidden][name='user[322][category_ids][]'][value=]", count: 1 + assert_select "input[type=hidden][name='user[322][category_ids][]'][value='']", count: 1 end test 'collection check boxes does not generate a hidden field if include_hidden option is false' do collection = [Category.new(1, 'Category 1'), Category.new(2, 'Category 2')] with_collection_check_boxes :user, :category_ids, collection, :id, :name, include_hidden: false - assert_select "input[type=hidden][name='user[category_ids][]'][value=]", :count => 0 + assert_select "input[type=hidden][name='user[category_ids][]'][value='']", :count => 0 end test 'collection check boxes accepts a collection and generate a series of checkboxes with labels for label method' do @@ -353,27 +353,27 @@ class FormCollectionsHelperTest < ActionView::TestCase collection = (1..3).map{|i| [i, "Category #{i}"] } with_collection_check_boxes :user, :category_ids, collection, :first, :last, :readonly => [1, 3] - assert_select 'input[type=checkbox][value=1][readonly=readonly]' - assert_select 'input[type=checkbox][value=3][readonly=readonly]' - assert_no_select 'input[type=checkbox][value=2][readonly=readonly]' + assert_select 'input[type=checkbox][value="1"][readonly=readonly]' + assert_select 'input[type=checkbox][value="3"][readonly=readonly]' + assert_no_select 'input[type=checkbox][value="2"][readonly=readonly]' end test 'collection check boxes accepts single readonly item' do collection = (1..3).map{|i| [i, "Category #{i}"] } with_collection_check_boxes :user, :category_ids, collection, :first, :last, :readonly => 1 - assert_select 'input[type=checkbox][value=1][readonly=readonly]' - assert_no_select 'input[type=checkbox][value=3][readonly=readonly]' - assert_no_select 'input[type=checkbox][value=2][readonly=readonly]' + assert_select 'input[type=checkbox][value="1"][readonly=readonly]' + assert_no_select 'input[type=checkbox][value="3"][readonly=readonly]' + assert_no_select 'input[type=checkbox][value="2"][readonly=readonly]' end test 'collection check boxes accepts a proc to readonly items' do collection = (1..3).map{|i| [i, "Category #{i}"] } with_collection_check_boxes :user, :category_ids, collection, :first, :last, :readonly => proc { |i| i.first == 1 } - assert_select 'input[type=checkbox][value=1][readonly=readonly]' - assert_no_select 'input[type=checkbox][value=3][readonly=readonly]' - assert_no_select 'input[type=checkbox][value=2][readonly=readonly]' + assert_select 'input[type=checkbox][value="1"][readonly=readonly]' + assert_no_select 'input[type=checkbox][value="3"][readonly=readonly]' + assert_no_select 'input[type=checkbox][value="2"][readonly=readonly]' end test 'collection check boxes accepts html options' do |