summaryrefslogtreecommitdiffstats
path: root/test/integration/routing/repositories_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/routing/repositories_test.rb')
-rw-r--r--test/integration/routing/repositories_test.rb38
1 files changed, 33 insertions, 5 deletions
diff --git a/test/integration/routing/repositories_test.rb b/test/integration/routing/repositories_test.rb
index 9c1d6ff4e..edc49e70b 100644
--- a/test/integration/routing/repositories_test.rb
+++ b/test/integration/routing/repositories_test.rb
@@ -24,19 +24,47 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
assert_equal %w[path to file.c], @path_hash[:param]
end
- def test_repositories
+ def test_repositories_resources
assert_routing(
{ :method => 'get',
- :path => "/projects/redmine/repository" },
- { :controller => 'repositories', :action => 'show', :id => 'redmine' }
+ :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 => "/projects/redmine/repository/edit" },
- { :controller => 'repositories', :action => 'edit', :id => 'redmine' }
+ :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' }
+ )
assert_routing(
{ :method => 'get',
:path => "/projects/redmine/repository/statistics" },