diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-03 04:09:24 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-03 04:09:24 -0800 |
commit | de729af21ed0caea56b2e5cc772270cc864c7d82 (patch) | |
tree | 180573fb4d1d2bb53e5b4d1b0cc628c30cc66f6e /railties/test | |
parent | e0be37ccdb73a11035d3cff640bdfde7d4986cfc (diff) | |
parent | 1030b7b2d6ffe55b33ed55c2388702679c282367 (diff) | |
download | rails-de729af21ed0caea56b2e5cc772270cc864c7d82.tar.gz rails-de729af21ed0caea56b2e5cc772270cc864c7d82.tar.bz2 rails-de729af21ed0caea56b2e5cc772270cc864c7d82.zip |
Merge pull request #8717 from amatsuda/scaffold_controller_test_patch
test PATCH method for update action in generated scaffold controller test rather than PUT
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/scaffold_controller_generator_test.rb | 4 | ||||
-rw-r--r-- | railties/test/generators/scaffold_generator_test.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/generators/scaffold_controller_generator_test.rb b/railties/test/generators/scaffold_controller_generator_test.rb index f13305adb0..217648263a 100644 --- a/railties/test/generators/scaffold_controller_generator_test.rb +++ b/railties/test/generators/scaffold_controller_generator_test.rb @@ -101,7 +101,7 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase assert_match(/class UsersControllerTest < ActionController::TestCase/, content) assert_match(/test "should get index"/, content) assert_match(/post :create, user: \{ age: @user\.age, name: @user\.name, organization_id: @user\.organization_id, organization_type: @user\.organization_type \}/, content) - assert_match(/put :update, id: @user, user: \{ age: @user\.age, name: @user\.name, organization_id: @user\.organization_id, organization_type: @user\.organization_type \}/, content) + assert_match(/patch :update, id: @user, user: \{ age: @user\.age, name: @user\.name, organization_id: @user\.organization_id, organization_type: @user\.organization_type \}/, content) end end @@ -112,7 +112,7 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase assert_match(/class UsersControllerTest < ActionController::TestCase/, content) assert_match(/test "should get index"/, content) assert_match(/post :create, user: \{ \}/, content) - assert_match(/put :update, id: @user, user: \{ \}/, content) + assert_match(/patch :update, id: @user, user: \{ \}/, content) end end diff --git a/railties/test/generators/scaffold_generator_test.rb b/railties/test/generators/scaffold_generator_test.rb index f3f2c170ee..a8dc50f601 100644 --- a/railties/test/generators/scaffold_generator_test.rb +++ b/railties/test/generators/scaffold_generator_test.rb @@ -61,7 +61,7 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase assert_file "test/controllers/product_lines_controller_test.rb" do |test| assert_match(/class ProductLinesControllerTest < ActionController::TestCase/, test) assert_match(/post :create, product_line: \{ product_id: @product_line\.product_id, title: @product_line\.title, user_id: @product_line\.user_id \}/, test) - assert_match(/put :update, id: @product_line, product_line: \{ product_id: @product_line\.product_id, title: @product_line\.title, user_id: @product_line\.user_id \}/, test) + assert_match(/patch :update, id: @product_line, product_line: \{ product_id: @product_line\.product_id, title: @product_line\.title, user_id: @product_line\.user_id \}/, test) end # Views @@ -87,7 +87,7 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase assert_match(/class ProductLinesControllerTest < ActionController::TestCase/, content) assert_match(/test "should get index"/, content) assert_match(/post :create, product_line: \{ \}/, content) - assert_match(/put :update, id: @product_line, product_line: \{ \}/, content) + assert_match(/patch :update, id: @product_line, product_line: \{ \}/, content) end end |