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
This commit is contained in:
Jeremy Kemper
2006-07-05 23:48:27 +00:00
parent f833a78049
commit 68608e331f
2 changed files with 6 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
*SVN*
* Update scaffolding functional tests to use :id => people(:first) instead of :id => 1. #5612 [evan@protest.net]
* db:test:clone should remove existing tables before reloading the schema. #5607 [sveit@tradeharbor.com]
* Fixed migration generation for class names like ACLController #5197 [brad@madriska.com]

View File

@@ -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