diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-06-16 14:27:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-06-16 14:27:51 +0000 |
commit | 4137ba8e816c9e8c1782181e5bf1cb0d0ad09d75 (patch) | |
tree | d0e69f33679828abe1402d260a5c41938a9d44f8 /test/integration | |
parent | 794a2a0180ed2d2801be4146ac59799747683b3d (diff) | |
download | redmine-4137ba8e816c9e8c1782181e5bf1cb0d0ad09d75.tar.gz redmine-4137ba8e816c9e8c1782181e5bf1cb0d0ad09d75.zip |
Removes repository routes without repository_id (#26522).
git-svn-id: http://svn.redmine.org/redmine/trunk@17386 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/repositories_git_test.rb | 2 | ||||
-rw-r--r-- | test/integration/routing/repositories_test.rb | 39 |
2 files changed, 2 insertions, 39 deletions
diff --git a/test/integration/repositories_git_test.rb b/test/integration/repositories_git_test.rb index 049b339bb..ba1922240 100644 --- a/test/integration/repositories_git_test.rb +++ b/test/integration/repositories_git_test.rb @@ -43,7 +43,7 @@ class RepositoriesGitTest < Redmine::IntegrationTest end def test_diff_two_revs - get '/projects/subproject1/repository/diff?rev=61b685fbe&rev_to=2f9c0091' + get "/projects/subproject1/repository/#{@repository.id}/diff?rev=61b685fbe&rev_to=2f9c0091" assert_response :success end end diff --git a/test/integration/routing/repositories_test.rb b/test/integration/routing/repositories_test.rb index 337686169..15f707091 100644 --- a/test/integration/routing/repositories_test.rb +++ b/test/integration/routing/repositories_test.rb @@ -20,7 +20,7 @@ require File.expand_path('../../../test_helper', __FILE__) class RoutingRepositoriesTest < Redmine::RoutingTest def setup - @paths = ['path/to/file.c', 'path/to/index.html'] + @paths = ['path/to/file.c', 'path/to/index.html', 'raw/file.c'] end def test_repositories_resources @@ -37,8 +37,6 @@ class RoutingRepositoriesTest < Redmine::RoutingTest def test_repositories should_route 'GET /projects/foo/repository' => 'repositories#show', :id => 'foo' - should_route 'GET /projects/foo/repository/statistics' => 'repositories#stats', :id => 'foo' - should_route 'GET /projects/foo/repository/graph' => 'repositories#graph', :id => 'foo' end def test_repositories_with_repository_id @@ -47,23 +45,6 @@ class RoutingRepositoriesTest < Redmine::RoutingTest should_route 'GET /projects/foo/repository/svn/graph' => 'repositories#graph', :id => 'foo', :repository_id => 'svn' end - def test_repositories_revisions - should_route 'GET /projects/foo/repository/revision' => 'repositories#revision', :id => 'foo' - should_route 'GET /projects/foo/repository/revisions' => 'repositories#revisions', :id => 'foo' - should_route 'GET /projects/foo/repository/revisions.atom' => 'repositories#revisions', :id => 'foo', :format => 'atom' - - should_route 'GET /projects/foo/repository/revisions/2457' => 'repositories#revision', :id => 'foo', :rev => '2457' - should_route 'GET /projects/foo/repository/revisions/2457/show' => 'repositories#show', :id => 'foo', :rev => '2457', :format => 'html' - should_route 'GET /projects/foo/repository/revisions/2457/diff' => 'repositories#diff', :id => 'foo', :rev => '2457', :format => 'html' - - %w(show diff entry raw annotate).each do |action| - @paths.each do |path| - should_route "GET /projects/foo/repository/revisions/2457/#{action}/#{path}" => "repositories##{action}", - :id => 'foo', :rev => '2457', :path => path, :format => 'html' - end - end - end - def test_repositories_revisions_with_repository_id should_route 'GET /projects/foo/repository/foo/revision' => 'repositories#revision', :id => 'foo', :repository_id => 'foo' should_route 'GET /projects/foo/repository/foo/revisions' => 'repositories#revisions', :id => 'foo', :repository_id => 'foo' @@ -81,17 +62,6 @@ class RoutingRepositoriesTest < Redmine::RoutingTest end end - def test_repositories_non_revisions_path - should_route 'GET /projects/foo/repository/changes' => 'repositories#changes', :id => 'foo', :format => 'html' - - %w(changes diff browse entry raw annotate).each do |action| - @paths.each do |path| - should_route "GET /projects/foo/repository/#{action}/#{path}" => "repositories##{action}", - :id => 'foo', :path => path, :format => 'html' - end - end - end - def test_repositories_non_revisions_path_with_repository_id should_route 'GET /projects/foo/repository/svn/changes' => 'repositories#changes', :id => 'foo', :repository_id => 'svn', :format => 'html' @@ -103,13 +73,6 @@ class RoutingRepositoriesTest < Redmine::RoutingTest end end - def test_repositories_related_issues - should_route 'POST /projects/foo/repository/revisions/123/issues' => 'repositories#add_related_issue', - :id => 'foo', :rev => '123' - should_route 'DELETE /projects/foo/repository/revisions/123/issues/25' => 'repositories#remove_related_issue', - :id => 'foo', :rev => '123', :issue_id => '25' - end - def test_repositories_related_issues_with_repository_id should_route 'POST /projects/foo/repository/svn/revisions/123/issues' => 'repositories#add_related_issue', :id => 'foo', :repository_id => 'svn', :rev => '123' |