diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-26 20:07:34 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-26 20:07:34 +0000 |
commit | dcaa074abf5691a933b9c55159cc7d98a02b3b2f (patch) | |
tree | 4d58fee286eaa957e141939dcbd898055cab2325 /actionpack/test/controller/resources_test.rb | |
parent | 42ebf559cc6ed80fa3bf55ecc1dea7c9e593f45e (diff) | |
download | rails-dcaa074abf5691a933b9c55159cc7d98a02b3b2f.tar.gz rails-dcaa074abf5691a933b9c55159cc7d98a02b3b2f.tar.bz2 rails-dcaa074abf5691a933b9c55159cc7d98a02b3b2f.zip |
Routing: respond with 405 Method Not Allowed status when the route path matches but the HTTP method does not. Closes #6953.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/resources_test.rb')
-rw-r--r-- | actionpack/test/controller/resources_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index 60d94120af..8149c02a9d 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -188,7 +188,7 @@ class ResourcesTest < Test::Unit::TestCase with_restful_routing :messages do assert_restful_routes_for :messages do |options| assert_recognizes(options.merge(:action => "new"), :path => "/messages/new", :method => :get) - assert_raises(ActionController::RoutingError) do + assert_raises(ActionController::MethodNotAllowed) do ActionController::Routing::Routes.recognize_path("/messages/new", :method => :post) end end @@ -384,11 +384,11 @@ class ResourcesTest < Test::Unit::TestCase options = { :controller => controller_name.to_s } collection_path = "/#{controller_name}" - assert_raises(ActionController::RoutingError) do + assert_raises(ActionController::MethodNotAllowed) do assert_recognizes(options.merge(:action => 'update'), :path => collection_path, :method => :put) end - assert_raises(ActionController::RoutingError) do + assert_raises(ActionController::MethodNotAllowed) do assert_recognizes(options.merge(:action => 'destroy'), :path => collection_path, :method => :delete) end end |