diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2013-03-31 12:36:39 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2013-03-31 12:36:39 -0700 |
commit | 31216ec84b6988683c0c60e1ff08163a75d27680 (patch) | |
tree | 2d9f47077c94e8614388499df0cadc103b8cae97 /actionpack | |
parent | d535249b48ff830ffc5c282cc55474c95a20e603 (diff) | |
parent | d0b8f4c309beb009bfc4538a85ee17feb9b34436 (diff) | |
download | rails-31216ec84b6988683c0c60e1ff08163a75d27680.tar.gz rails-31216ec84b6988683c0c60e1ff08163a75d27680.tar.bz2 rails-31216ec84b6988683c0c60e1ff08163a75d27680.zip |
Merge pull request #10013 from vipulnsward/fix_request_method_test
fix request methods test
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 978c5aa7ac..f735564305 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -715,17 +715,13 @@ class LegacyRouteSetTests < ActiveSupport::TestCase def setup_request_method_routes_for(method) rs.draw do - match '/match' => 'books#get', :via => :get - match '/match' => 'books#post', :via => :post - match '/match' => 'books#put', :via => :put - match '/match' => 'books#patch', :via => :patch - match '/match' => 'books#delete', :via => :delete + match '/match' => "books##{method}", :via => method.to_sym end end %w(GET PATCH POST PUT DELETE).each do |request_method| define_method("test_request_method_recognized_with_#{request_method}") do - setup_request_method_routes_for(request_method) + setup_request_method_routes_for(request_method.downcase) params = rs.recognize_path("/match", :method => request_method) assert_equal request_method.downcase, params[:action] end |