aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-01-31 17:53:43 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-02-02 09:40:23 -0200
commit6028c1549f7ab7f72309c5c9c188d23a44bc2389 (patch)
tree71888a2cb237c0e5e20b2d19d2ac726401ec9c5f /actionpack/test
parent21eba34718660b96b45cbb594d557b7e84bfed4f (diff)
downloadrails-6028c1549f7ab7f72309c5c9c188d23a44bc2389.tar.gz
rails-6028c1549f7ab7f72309c5c9c188d23a44bc2389.tar.bz2
rails-6028c1549f7ab7f72309c5c9c188d23a44bc2389.zip
Implement skipped test
[Carlos Antonio da Silva + Rafael Mendonça França]
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/form_collections_helper_test.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/test/template/form_collections_helper_test.rb b/actionpack/test/template/form_collections_helper_test.rb
index 995cfdae87..162c609151 100644
--- a/actionpack/test/template/form_collections_helper_test.rb
+++ b/actionpack/test/template/form_collections_helper_test.rb
@@ -249,10 +249,12 @@ class FormCollectionsHelperTest < ActionView::TestCase
end
test 'collection check boxes accepts selected values as :checked option and override the model values' do
- skip "check with fields for"
+ user = Struct.new(:category_ids).new(2)
collection = (1..3).map{|i| [i, "Category #{i}"] }
- :user.category_ids = [2]
- with_collection_check_boxes :user, :category_ids, collection, :first, :last, :checked => [1, 3]
+
+ concat(fields_for(:user, user) do |p|
+ p.collection_check_boxes :category_ids, collection, :first, :last, :checked => [1, 3]
+ end)
assert_select 'input[type=checkbox][value=1][checked=checked]'
assert_select 'input[type=checkbox][value=3][checked=checked]'