From 5bed0e5cc0ae85975352808022201cf7431684e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 12 Mar 2012 19:41:17 -0300 Subject: Do not use the attributes hash in the scaffold functional tests --- railties/test/generators/scaffold_controller_generator_test.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'railties/test/generators/scaffold_controller_generator_test.rb') diff --git a/railties/test/generators/scaffold_controller_generator_test.rb b/railties/test/generators/scaffold_controller_generator_test.rb index 65b30b9fbd..f2406a149b 100644 --- a/railties/test/generators/scaffold_controller_generator_test.rb +++ b/railties/test/generators/scaffold_controller_generator_test.rb @@ -75,6 +75,9 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase assert_file "test/functional/users_controller_test.rb" do |content| assert_match(/class UsersControllerTest < ActionController::TestCase/, content) assert_match(/test "should get index"/, content) + assert_match(/@valid_attributes = @user\.attributes\.slice\("age", "name"\)/, content) + assert_match(/post :create, user: @valid_attributes/, content) + assert_match(/put :update, id: @user, user: @valid_attributes/, content) end end -- cgit v1.2.3