+ ##
+ # test all routes which lead to this controller
+ def test_routes
+ assert_routing(
+ { :path => "/api/0.6/changeset/create", :method => :put },
+ { :controller => "changeset", :action => "create" }
+ )
+ assert_routing(
+ { :path => "/api/0.6/changeset/1/upload", :method => :post },
+ { :controller => "changeset", :action => "upload", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/api/0.6/changeset/1/download", :method => :get },
+ { :controller => "changeset", :action => "download", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/api/0.6/changeset/1/expand_bbox", :method => :post },
+ { :controller => "changeset", :action => "expand_bbox", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/api/0.6/changeset/1", :method => :get },
+ { :controller => "changeset", :action => "read", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/api/0.6/changeset/1", :method => :put },
+ { :controller => "changeset", :action => "update", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/api/0.6/changeset/1/close", :method => :put },
+ { :controller => "changeset", :action => "close", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/api/0.6/changesets", :method => :get },
+ { :controller => "changeset", :action => "query" }
+ )
+ assert_routing(
+ { :path => "/user/name/history", :method => :get },
+ { :controller => "changeset", :action => "list", :display_name => "name" }
+ )
+ assert_routing(
+ { :path => "/user/name/history/feed", :method => :get },
+ { :controller => "changeset", :action => "feed", :display_name => "name", :format => :atom }
+ )
+ assert_routing(
+ { :path => "/history/friends", :method => :get },
+ { :controller => "changeset", :action => "list", :friends => true }
+ )
+ assert_routing(
+ { :path => "/history/nearby", :method => :get },
+ { :controller => "changeset", :action => "list", :nearby => true }
+ )
+ assert_routing(
+ { :path => "/history", :method => :get },
+ { :controller => "changeset", :action => "list" }
+ )
+ assert_routing(
+ { :path => "/history/feed", :method => :get },
+ { :controller => "changeset", :action => "feed", :format => :atom }
+ )
+ end
+