+ ##
+ # test all routes which lead to this controller
+ def test_routes
+ assert_routing(
+ { :path => "/node/1", :method => :get },
+ { :controller => "browse", :action => "node", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/node/1/history", :method => :get },
+ { :controller => "browse", :action => "node_history", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/way/1", :method => :get },
+ { :controller => "browse", :action => "way", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/way/1/history", :method => :get },
+ { :controller => "browse", :action => "way_history", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/relation/1", :method => :get },
+ { :controller => "browse", :action => "relation", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/relation/1/history", :method => :get },
+ { :controller => "browse", :action => "relation_history", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/changeset/1", :method => :get },
+ { :controller => "browse", :action => "changeset", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/note/1", :method => :get },
+ { :controller => "browse", :action => "note", :id => "1" }
+ )
+ assert_routing(
+ { :path => "/note/new", :method => :get },
+ { :controller => "browse", :action => "new_note" }
+ )