Created
January 2, 2010 18:46
-
-
Save rubys/267606 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb b/railties/lib/rails/generators/test_unit/scaff | |
index e4bf403..9380aa4 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 | |
@@ -16,7 +16,7 @@ class <%= controller_class_name %>ControllerTest < ActionController::TestCase | |
test "should create <%= file_name %>" do | |
assert_difference('<%= class_name %>.count') do | |
- post :create, :<%= file_name %> => { } | |
+ post :create, :<%= file_name %> => <%= table_name %>(:one).attributes | |
end | |
assert_redirected_to <%= file_name %>_path(assigns(:<%= file_name %>)) | |
@@ -33,7 +33,7 @@ class <%= controller_class_name %>ControllerTest < ActionController::TestCase | |
end | |
test "should update <%= file_name %>" do | |
- put :update, :id => <%= table_name %>(:one).to_param, :<%= file_name %> => { } | |
+ put :update, :id => <%= table_name %>(:one).to_param, :<%= file_name %> => <%= table_name %>(:one).attributes | |
assert_redirected_to <%= file_name %>_path(assigns(:<%= file_name %>)) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment