aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/form_collections_helper_test.rb173
1 files changed, 0 insertions, 173 deletions
diff --git a/actionpack/test/template/form_collections_helper_test.rb b/actionpack/test/template/form_collections_helper_test.rb
index bb4e9fce1b..ac8e7ddb3f 100644
--- a/actionpack/test/template/form_collections_helper_test.rb
+++ b/actionpack/test/template/form_collections_helper_test.rb
@@ -76,93 +76,6 @@ class FormCollectionsHelperTest < ActionView::TestCase
assert_select 'input[type=radio][value=false].special-radio#user_active_false'
end
- test 'collection radio wraps the collection in the given collection wrapper tag' do
- with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s, :collection_wrapper_tag => :ul
-
- assert_select 'ul input[type=radio]', :count => 2
- end
-
- test 'collection radio does not render any wrapper tag by default' do
- with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s
-
- assert_select 'input[type=radio]', :count => 2
- assert_no_select 'ul'
- end
-
- test 'collection radio does not wrap the collection when given falsy values' do
- with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s, :collection_wrapper_tag => false
-
- assert_select 'input[type=radio]', :count => 2
- assert_no_select 'ul'
- end
-
- test 'collection radio uses the given class for collection wrapper tag' do
- with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s,
- :collection_wrapper_tag => :ul, :collection_wrapper_class => "items-list"
-
- assert_select 'ul.items-list input[type=radio]', :count => 2
- end
-
- test 'collection radio uses no class for collection wrapper tag when no wrapper tag is given' do
- with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s,
- :collection_wrapper_class => "items-list"
-
- assert_select 'input[type=radio]', :count => 2
- assert_no_select 'ul'
- assert_no_select '.items-list'
- end
-
- test 'collection radio uses no class for collection wrapper tag by default' do
- with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s, :collection_wrapper_tag => :ul
-
- assert_select 'ul'
- assert_no_select 'ul[class]'
- end
-
- test 'collection radio wrap items in a span tag by default' do
- with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s
-
- assert_select 'span input[type=radio][value=true]#user_active_true + label'
- assert_select 'span input[type=radio][value=false]#user_active_false + label'
- end
-
- test 'collection radio wraps each item in the given item wrapper tag' do
- with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s, :item_wrapper_tag => :li
-
- assert_select 'li input[type=radio]', :count => 2
- end
-
- test 'collection radio does not wrap each item when given explicitly falsy value' do
- with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s, :item_wrapper_tag => false
-
- assert_select 'input[type=radio]'
- assert_no_select 'span input[type=radio]'
- end
-
- test 'collection radio uses the given class for item wrapper tag' do
- with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s,
- :item_wrapper_tag => :li, :item_wrapper_class => "inline"
-
- assert_select "li.inline input[type=radio]", :count => 2
- end
-
- test 'collection radio uses no class for item wrapper tag when no wrapper tag is given' do
- with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s,
- :item_wrapper_tag => nil, :item_wrapper_class => "inline"
-
- assert_select 'input[type=radio]', :count => 2
- assert_no_select 'li'
- assert_no_select '.inline'
- end
-
- test 'collection radio uses no class for item wrapper tag by default' do
- with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s,
- :item_wrapper_tag => :li
-
- assert_select "li", :count => 2
- assert_no_select "li[class]"
- end
-
test 'collection radio does not wrap input inside the label' do
with_collection_radio_buttons :user, :active, [true, false], :to_s, :to_s
@@ -308,92 +221,6 @@ class FormCollectionsHelperTest < ActionView::TestCase
assert_select 'label.collection_check_boxes[for=post_category_ids_2]', 'Category 2'
end
- test 'collection check boxeses wraps the collection in the given collection wrapper tag' do
- with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s, :collection_wrapper_tag => :ul
-
- assert_select 'ul input[type=checkbox]', :count => 2
- end
-
- test 'collection check boxeses does not render any wrapper tag by default' do
- with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s
-
- assert_select 'input[type=checkbox]', :count => 2
- assert_no_select 'ul'
- end
-
- test 'collection check boxeses does not wrap the collection when given falsy values' do
- with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s, :collection_wrapper_tag => false
-
- assert_select 'input[type=checkbox]', :count => 2
- assert_no_select 'ul'
- end
-
- test 'collection check boxeses uses the given class for collection wrapper tag' do
- with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s,
- :collection_wrapper_tag => :ul, :collection_wrapper_class => "items-list"
-
- assert_select 'ul.items-list input[type=checkbox]', :count => 2
- end
-
- test 'collection check boxeses uses no class for collection wrapper tag when no wrapper tag is given' do
- with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s,
- :collection_wrapper_class => "items-list"
-
- assert_select 'input[type=checkbox]', :count => 2
- assert_no_select 'ul'
- assert_no_select '.items-list'
- end
-
- test 'collection check boxeses uses no class for collection wrapper tag by default' do
- with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s, :collection_wrapper_tag => :ul
-
- assert_select 'ul'
- assert_no_select 'ul[class]'
- end
-
- test 'collection check boxeses wrap items in a span tag by default' do
- with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s
-
- assert_select 'span input[type=checkbox]', :count => 2
- end
-
- test 'collection check boxeses wraps each item in the given item wrapper tag' do
- with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s, :item_wrapper_tag => :li
-
- assert_select 'li input[type=checkbox]', :count => 2
- end
-
- test 'collection check boxeses does not wrap each item when given explicitly falsy value' do
- with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s, :item_wrapper_tag => false
-
- assert_select 'input[type=checkbox]'
- assert_no_select 'span input[type=checkbox]'
- end
-
- test 'collection check boxeses uses the given class for item wrapper tag' do
- with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s,
- :item_wrapper_tag => :li, :item_wrapper_class => "inline"
-
- assert_select "li.inline input[type=checkbox]", :count => 2
- end
-
- test 'collection check boxeses uses no class for item wrapper tag when no wrapper tag is given' do
- with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s,
- :item_wrapper_tag => nil, :item_wrapper_class => "inline"
-
- assert_select 'input[type=checkbox]', :count => 2
- assert_no_select 'li'
- assert_no_select '.inline'
- end
-
- test 'collection check boxeses uses no class for item wrapper tag by default' do
- with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s,
- :item_wrapper_tag => :li
-
- assert_select "li", :count => 2
- assert_no_select "li[class]"
- end
-
test 'collection check boxes does not wrap input inside the label' do
with_collection_check_boxes :user, :active, [true, false], :to_s, :to_s