Simplify browse routes and make routes more consistent
This gets rid of the /browse/ prefix and uses /history consistently for all routes that show a list of changesets.
This commit is contained in:
parent
6b236ec95b
commit
3cd5f45e08
9 changed files with 62 additions and 46 deletions
|
@ -8,37 +8,41 @@ class BrowseControllerTest < ActionController::TestCase
|
|||
# test all routes which lead to this controller
|
||||
def test_routes
|
||||
assert_routing(
|
||||
{ :path => "/browse/node/1", :method => :get },
|
||||
{ :path => "/node/1", :method => :get },
|
||||
{ :controller => "browse", :action => "node", :id => "1" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/browse/node/1/history", :method => :get },
|
||||
{ :path => "/node/1/history", :method => :get },
|
||||
{ :controller => "browse", :action => "node_history", :id => "1" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/browse/way/1", :method => :get },
|
||||
{ :path => "/way/1", :method => :get },
|
||||
{ :controller => "browse", :action => "way", :id => "1" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/browse/way/1/history", :method => :get },
|
||||
{ :path => "/way/1/history", :method => :get },
|
||||
{ :controller => "browse", :action => "way_history", :id => "1" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/browse/relation/1", :method => :get },
|
||||
{ :path => "/relation/1", :method => :get },
|
||||
{ :controller => "browse", :action => "relation", :id => "1" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/browse/relation/1/history", :method => :get },
|
||||
{ :path => "/relation/1/history", :method => :get },
|
||||
{ :controller => "browse", :action => "relation_history", :id => "1" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/browse/changeset/1", :method => :get },
|
||||
{ :path => "/changeset/1", :method => :get },
|
||||
{ :controller => "browse", :action => "changeset", :id => "1" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/browse/note/1", :method => :get },
|
||||
{ :path => "/note/1", :method => :get },
|
||||
{ :controller => "browse", :action => "note", :id => "1" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/note/new", :method => :get },
|
||||
{ :controller => "browse", :action => "new_note" }
|
||||
)
|
||||
end
|
||||
|
||||
def test_read_relation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue