diff options
author | Koichi ITO <koic.ito@gmail.com> | 2017-08-12 20:31:46 +0900 |
---|---|---|
committer | Koichi ITO <koic.ito@gmail.com> | 2017-08-16 17:55:25 +0900 |
commit | 7c260ae20170159f85d8b7ded1209f12653934fc (patch) | |
tree | 7a47c50110652ed74e5984e59d50699e20b64f30 /actionview/test/template/form_collections_helper_test.rb | |
parent | 11fd246d8f6406aa5165ebf45ca8f17c67716f7e (diff) | |
download | rails-7c260ae20170159f85d8b7ded1209f12653934fc.tar.gz rails-7c260ae20170159f85d8b7ded1209f12653934fc.tar.bz2 rails-7c260ae20170159f85d8b7ded1209f12653934fc.zip |
Fix RuboCop offenses
And enable `context_dependent` of Style/BracesAroundHashParameters cop.
Diffstat (limited to 'actionview/test/template/form_collections_helper_test.rb')
-rw-r--r-- | actionview/test/template/form_collections_helper_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionview/test/template/form_collections_helper_test.rb b/actionview/test/template/form_collections_helper_test.rb index bba529a98a..6db55a1447 100644 --- a/actionview/test/template/form_collections_helper_test.rb +++ b/actionview/test/template/form_collections_helper_test.rb @@ -95,7 +95,7 @@ class FormCollectionsHelperTest < ActionView::TestCase test "collection radio accepts html options as input" do collection = [[1, true], [0, false]] - with_collection_radio_buttons :user, :active, collection, :last, :first, {}, class: "special-radio" + with_collection_radio_buttons :user, :active, collection, :last, :first, {}, { class: "special-radio" } assert_select "input[type=radio][value=true].special-radio#user_active_true" assert_select "input[type=radio][value=false].special-radio#user_active_false" @@ -215,7 +215,7 @@ class FormCollectionsHelperTest < ActionView::TestCase test "collection radio buttons generates a hidden field using the given :name in :html_options" do collection = [Category.new(1, "Category 1"), Category.new(2, "Category 2")] - with_collection_radio_buttons :user, :category_ids, collection, :id, :name, {}, name: "user[other_category_ids]" + with_collection_radio_buttons :user, :category_ids, collection, :id, :name, {}, { name: "user[other_category_ids]" } assert_select "input[type=hidden][name='user[other_category_ids]'][value='']", count: 1 end @@ -259,7 +259,7 @@ class FormCollectionsHelperTest < ActionView::TestCase test "collection check boxes generates a hidden field using the given :name in :html_options" do collection = [Category.new(1, "Category 1"), Category.new(2, "Category 2")] - with_collection_check_boxes :user, :category_ids, collection, :id, :name, {}, name: "user[other_category_ids][]" + with_collection_check_boxes :user, :category_ids, collection, :id, :name, {}, { name: "user[other_category_ids][]" } assert_select "input[type=hidden][name='user[other_category_ids][]'][value='']", count: 1 end @@ -446,7 +446,7 @@ class FormCollectionsHelperTest < ActionView::TestCase test "collection check boxes accepts html options" do collection = [[1, "Category 1"], [2, "Category 2"]] - with_collection_check_boxes :user, :category_ids, collection, :first, :last, {}, class: "check" + with_collection_check_boxes :user, :category_ids, collection, :first, :last, {}, { class: "check" } assert_select 'input.check[type=checkbox][value="1"]' assert_select 'input.check[type=checkbox][value="2"]' |