mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove needless to_param in scaffold functional test
This commit is contained in:
parent
9dd168c402
commit
98fbb50ebf
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue