diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-07-05 23:48:27 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-07-05 23:48:27 +0000 |
commit | 68608e331f88c3168cc3aa270ab5f1deea394c97 (patch) | |
tree | 26a0b2b8584c613332c9f82a98bfa68ac716eefd /railties/lib/rails_generator/generators/components | |
parent | f833a780490d5c53c1c0c6c1b3fe97f639b8194c (diff) | |
download | rails-68608e331f88c3168cc3aa270ab5f1deea394c97.tar.gz rails-68608e331f88c3168cc3aa270ab5f1deea394c97.tar.bz2 rails-68608e331f88c3168cc3aa270ab5f1deea394c97.zip |
Update scaffolding functional tests to use :id => people(:first) instead of :id => 1. Closes #5612.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4559 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators/components')
-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 3441b56670..31792767a3 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 @@ -39,7 +39,7 @@ class <%= controller_class_name %>ControllerTest < Test::Unit::TestCase end def test_show<%= suffix %> - get :show<%= suffix %>, :id => 1 + get :show<%= suffix %>, :id => <%= plural_name %>(:first) assert_response :success assert_template 'show' @@ -69,7 +69,7 @@ class <%= controller_class_name %>ControllerTest < Test::Unit::TestCase end def test_edit<%= suffix %> - get :edit<%= suffix %>, :id => 1 + get :edit<%= suffix %>, :id => <%= plural_name %>(:first) assert_response :success assert_template 'edit<%= suffix %>' @@ -79,13 +79,13 @@ class <%= controller_class_name %>ControllerTest < Test::Unit::TestCase end def test_update<%= suffix %> - post :update<%= suffix %>, :id => 1 + post :update<%= suffix %>, :id => <%= plural_name %>(:first) assert_response :redirect assert_redirected_to :action => 'show<%= suffix %>', :id => 1 end def test_destroy<%= suffix %> - assert_not_nil <%= model_name %>.find(1) + assert_not_nil <%= model_name %>.find(<%= plural_name %>(:first)) post :destroy, :id => 1 assert_response :redirect |