diff options
Diffstat (limited to 'railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb')
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb b/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb index b5df88f3b1..2b1f6520d9 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb @@ -21,23 +21,23 @@ class <%= controller_class_name %>ControllerTest < ActionController::TestCase end def test_should_show_<%= file_name %> - get :show, :id => 1 + get :show, :id => <%= table_name %>(:one).id assert_response :success end def test_should_get_edit - get :edit, :id => 1 + get :edit, :id => <%= table_name %>(:one).id assert_response :success end def test_should_update_<%= file_name %> - put :update, :id => 1, :<%= file_name %> => { } + put :update, :id => <%= table_name %>(:one).id, :<%= file_name %> => { } assert_redirected_to <%= file_name %>_path(assigns(:<%= file_name %>)) end def test_should_destroy_<%= file_name %> assert_difference('<%= class_name %>.count', -1) do - delete :destroy, :id => 1 + delete :destroy, :id => <%= table_name %>(:one).id end assert_redirected_to <%= table_name %>_path |