diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-01-30 12:31:44 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-01-30 12:31:44 +0100 |
commit | 670ac7312664a61f6125758531659e0238aa455b (patch) | |
tree | f0155c1b5b89db97d72f503959bae1f6bb506997 /railties/lib/rails | |
parent | 1fa7861bc9d3ecbdc53eaa1e71b8851b19e38bab (diff) | |
download | rails-670ac7312664a61f6125758531659e0238aa455b.tar.gz rails-670ac7312664a61f6125758531659e0238aa455b.tar.bz2 rails-670ac7312664a61f6125758531659e0238aa455b.zip |
scaffold controller_test template should use kwargs. refs #18323.
This prevents a flood of warnings when generating a new scaffold.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb b/railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb index 18bd1ece9d..8d825ae7b0 100644 --- a/railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb +++ b/railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb @@ -19,30 +19,30 @@ class <%= controller_class_name %>ControllerTest < ActionController::TestCase test "should create <%= singular_table_name %>" do assert_difference('<%= class_name %>.count') do - post :create, <%= "#{singular_table_name}: { #{attributes_hash} }" %> + post :create, params: { <%= "#{singular_table_name}: { #{attributes_hash} }" %> } end assert_redirected_to <%= singular_table_name %>_path(assigns(:<%= singular_table_name %>)) end test "should show <%= singular_table_name %>" do - get :show, id: <%= "@#{singular_table_name}" %> + get :show, params: { id: <%= "@#{singular_table_name}" %> } assert_response :success end test "should get edit" do - get :edit, id: <%= "@#{singular_table_name}" %> + get :edit, params: { id: <%= "@#{singular_table_name}" %> } assert_response :success end test "should update <%= singular_table_name %>" do - patch :update, id: <%= "@#{singular_table_name}" %>, <%= "#{singular_table_name}: { #{attributes_hash} }" %> + patch :update, params: { id: <%= "@#{singular_table_name}" %>, <%= "#{singular_table_name}: { #{attributes_hash} }" %> } assert_redirected_to <%= singular_table_name %>_path(assigns(:<%= singular_table_name %>)) end test "should destroy <%= singular_table_name %>" do assert_difference('<%= class_name %>.count', -1) do - delete :destroy, id: <%= "@#{singular_table_name}" %> + delete :destroy, params: { id: <%= "@#{singular_table_name}" %> } end assert_redirected_to <%= index_helper %>_path |