Added tests for old_* redaction routes

This commit is contained in:
Matt Amos 2012-03-28 18:59:54 +01:00 committed by Tom Hughes
parent 8bfb5cae8a
commit d9e4e5836f
3 changed files with 12 additions and 0 deletions

View file

@ -19,6 +19,10 @@ class OldNodeControllerTest < ActionController::TestCase
{ :path => "/api/0.6/node/1/2", :method => :get }, { :path => "/api/0.6/node/1/2", :method => :get },
{ :controller => "old_node", :action => "version", :id => "1", :version => "2" } { :controller => "old_node", :action => "version", :id => "1", :version => "2" }
) )
assert_routing(
{ :path => "/api/0.6/node/1/2/redact", :method => :post },
{ :controller => "old_node", :action => "redact", :id => "1", :version => "2" }
)
end end
## ##

View file

@ -15,6 +15,10 @@ class OldRelationControllerTest < ActionController::TestCase
{ :path => "/api/0.6/relation/1/2", :method => :get }, { :path => "/api/0.6/relation/1/2", :method => :get },
{ :controller => "old_relation", :action => "version", :id => "1", :version => "2" } { :controller => "old_relation", :action => "version", :id => "1", :version => "2" }
) )
assert_routing(
{ :path => "/api/0.6/relation/1/2/redact", :method => :post },
{ :controller => "old_relation", :action => "redact", :id => "1", :version => "2" }
)
end end
# ------------------------------------- # -------------------------------------

View file

@ -15,6 +15,10 @@ class OldWayControllerTest < ActionController::TestCase
{ :path => "/api/0.6/way/1/2", :method => :get }, { :path => "/api/0.6/way/1/2", :method => :get },
{ :controller => "old_way", :action => "version", :id => "1", :version => "2" } { :controller => "old_way", :action => "version", :id => "1", :version => "2" }
) )
assert_routing(
{ :path => "/api/0.6/way/1/2/redact", :method => :post },
{ :controller => "old_way", :action => "redact", :id => "1", :version => "2" }
)
end end
# ------------------------------------- # -------------------------------------