repository_views.connect 'projects/:id/repository/:repository_id/show/*path',
:requirements => { :path => /.+/ }
+ repository_views.connect 'projects/:id/repository/:repository_id/revision',
+ :action => 'revision'
+
repository_views.connect 'projects/:id/repository/revisions',
:action => 'revisions'
repository_views.connect 'projects/:id/repository/revisions.:format',
repository_views.connect 'projects/:id/repository/:action/*path',
:requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ }
+ repository_views.connect 'projects/:id/repository/revision',
+ :action => 'revision'
+
repository_views.connect 'projects/:id/repository/:repository_id',
:action => 'show'
end
-
- repositories.connect 'projects/:id/repository/revision',
- :action => 'revision',
- :conditions => {:method => [:get, :post]}
end
# additional routes for having the file name at the end of url
{ :controller => 'repositories', :action => 'changes', :id => 'redmine',
:path => @path_hash[:param] }
)
+ assert_routing(
+ { :method => 'get',
+ :path => "/projects/redmine/repository/revision" },
+ { :controller => 'repositories', :action => 'revision', :id => 'redmine' }
+ )
end
def test_repositories_non_revisions_path_with_repository_id
{ :controller => 'repositories', :action => 'changes', :id => 'redmine', :repository_id => 'foo',
:path => @path_hash[:param] }
)
+ assert_routing(
+ { :method => 'get',
+ :path => "/projects/redmine/repository/foo/revision" },
+ { :controller => 'repositories', :action => 'revision', :id => 'redmine', :repository_id => 'foo'}
+ )
end
def test_repositories_related_issues