diff options
author | José Valim <jose.valim@gmail.com> | 2011-10-24 11:57:06 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-10-24 11:57:06 -0700 |
commit | 7eaa2ee07b6086167716938ee6a82df514aa8eb9 (patch) | |
tree | 6f7e083b6ca876a6766f517b40c0e9309e877f9c | |
parent | 9dd168c40262e850885fcb3dd0028b9067bb627f (diff) | |
parent | 98fbb50ebf531af28deb1312baf943c24990ad25 (diff) | |
download | rails-7eaa2ee07b6086167716938ee6a82df514aa8eb9.tar.gz rails-7eaa2ee07b6086167716938ee6a82df514aa8eb9.tar.bz2 rails-7eaa2ee07b6086167716938ee6a82df514aa8eb9.zip |
Merge pull request #3424 from avakhov/av-scaffold-func-test-remove-to_param
Remove needless to_param in scaffold functional test
-rw-r--r-- | railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb | 8 |
1 files changed, 4 insertions, 4 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 01fe6dda7a..9ec2e34545 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 @@ -26,23 +26,23 @@ class <%= controller_class_name %>ControllerTest < ActionController::TestCase end test "should show <%= singular_table_name %>" do - get :show, <%= key_value :id, "@#{singular_table_name}.to_param" %> + get :show, <%= key_value :id, "@#{singular_table_name}" %> assert_response :success end test "should get edit" do - get :edit, <%= key_value :id, "@#{singular_table_name}.to_param" %> + get :edit, <%= key_value :id, "@#{singular_table_name}" %> assert_response :success end test "should update <%= singular_table_name %>" do - put :update, <%= key_value :id, "@#{singular_table_name}.to_param" %>, <%= key_value singular_table_name, "@#{singular_table_name}.attributes" %> + put :update, <%= key_value :id, "@#{singular_table_name}" %>, <%= key_value singular_table_name, "@#{singular_table_name}.attributes" %> 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, <%= key_value :id, "@#{singular_table_name}.to_param" %> + delete :destroy, <%= key_value :id, "@#{singular_table_name}" %> end assert_redirected_to <%= index_helper %>_path |