mirror of
https://github.com/redmine/redmine.git
synced 2026-05-06 05:37:25 +02:00
Resourcified repositories for CRUD operations to prepare for multiple SCM per project (#779).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8648 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -24,19 +24,47 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
||||
assert_equal %w[path to file.c], @path_hash[:param]
|
||||
end
|
||||
|
||||
def test_repositories_resources
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repositories/new" },
|
||||
{ :controller => 'repositories', :action => 'new', :project_id => 'redmine' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post',
|
||||
:path => "/projects/redmine/repositories" },
|
||||
{ :controller => 'repositories', :action => 'create', :project_id => 'redmine' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/repositories/1/edit" },
|
||||
{ :controller => 'repositories', :action => 'edit', :id => '1' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'put',
|
||||
:path => "/repositories/1" },
|
||||
{ :controller => 'repositories', :action => 'update', :id => '1' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'delete',
|
||||
:path => "/repositories/1" },
|
||||
{ :controller => 'repositories', :action => 'destroy', :id => '1' }
|
||||
)
|
||||
["get", "post"].each do |method|
|
||||
assert_routing(
|
||||
{ :method => method,
|
||||
:path => "/repositories/1/committers" },
|
||||
{ :controller => 'repositories', :action => 'committers', :id => '1' }
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def test_repositories
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository" },
|
||||
{ :controller => 'repositories', :action => 'show', :id => 'redmine' }
|
||||
)
|
||||
["get", "post"].each do |method|
|
||||
assert_routing(
|
||||
{ :method => method,
|
||||
:path => "/projects/redmine/repository/edit" },
|
||||
{ :controller => 'repositories', :action => 'edit', :id => 'redmine' }
|
||||
)
|
||||
end
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/statistics" },
|
||||
|
||||
Reference in New Issue
Block a user