Fix various routing and route generation errors

This commit is contained in:
Tom Hughes 2012-03-09 23:01:21 +00:00
parent 6391ea5a7a
commit 58d889436f
11 changed files with 32 additions and 24 deletions

View file

@ -6,7 +6,7 @@ class GeocoderControllerTest < ActionController::TestCase
# test all routes which lead to this controller
def test_routes
assert_routing(
{ :path => "/geocoder/search", :method => :get },
{ :path => "/geocoder/search", :method => :post },
{ :controller => "geocoder", :action => "search" }
)
assert_routing(
@ -39,7 +39,7 @@ class GeocoderControllerTest < ActionController::TestCase
)
assert_routing(
{ :path => "/geocoder/description", :method => :get },
{ :path => "/geocoder/description", :method => :post },
{ :controller => "geocoder", :action => "description" }
)
assert_routing(

View file

@ -33,6 +33,10 @@ class MessageControllerTest < ActionController::TestCase
{ :path => "/message/reply/1", :method => :get },
{ :controller => "message", :action => "reply", :message_id => "1" }
)
assert_routing(
{ :path => "/message/reply/1", :method => :post },
{ :controller => "message", :action => "reply", :message_id => "1" }
)
assert_routing(
{ :path => "/message/delete/1", :method => :post },
{ :controller => "message", :action => "delete", :message_id => "1" }

View file

@ -43,7 +43,7 @@ class SiteControllerTest < ActionController::TestCase
{ :controller => "site", :action => "offline" }
)
assert_routing(
{ :path => "/key", :method => :get },
{ :path => "/key", :method => :post },
{ :controller => "site", :action => "key" }
)
assert_routing(

View file

@ -140,6 +140,10 @@ class TraceControllerTest < ActionController::TestCase
{ :path => "/trace/1/edit", :method => :post },
{ :controller => "trace", :action => "edit", :id => "1" }
)
assert_routing(
{ :path => "/trace/1/edit", :method => :put },
{ :controller => "trace", :action => "edit", :id => "1" }
)
assert_routing(
{ :path => "/trace/1/delete", :method => :post },
{ :controller => "trace", :action => "delete", :id => "1" }