mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 01:06:00 +01:00
Removes repository routes without repository_id (#26522).
git-svn-id: http://svn.redmine.org/redmine/trunk@17386 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -65,7 +65,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_select 'table.entries tbody' do
|
||||
assert_select 'tr', 1
|
||||
assert_select 'tr.dir td.filename a', :text => 'subversion_test'
|
||||
assert_select 'tr.dir td.filename a[href=?]', '/projects/subproject1/repository/show/subversion_test'
|
||||
assert_select 'tr.dir td.filename a[href=?]', "/projects/subproject1/repository/#{@repository.id}/show/subversion_test"
|
||||
end
|
||||
|
||||
assert_select 'table.changesets tbody' do
|
||||
@@ -76,7 +76,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_select 'input[name=rev]'
|
||||
assert_select 'a', :text => 'Statistics'
|
||||
assert_select 'a', :text => 'Atom'
|
||||
assert_select 'a[href=?]', '/projects/subproject1/repository', :text => 'root'
|
||||
assert_select 'a[href=?]', "/projects/subproject1/repository/#{@repository.id}", :text => 'root'
|
||||
end
|
||||
|
||||
def test_show_non_default
|
||||
@@ -102,6 +102,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
get :show, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['subversion_test'])[:param]
|
||||
}
|
||||
assert_response :success
|
||||
@@ -125,6 +126,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
get :show, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['subversion_test'])[:param],
|
||||
:rev => 4
|
||||
}
|
||||
@@ -147,6 +149,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
get :changes, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['subversion_test', 'folder', 'helloworld.rb'])[:param]
|
||||
}
|
||||
assert_response :success
|
||||
@@ -174,6 +177,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
get :changes, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['subversion_test', 'folder'])[:param]
|
||||
}
|
||||
assert_response :success
|
||||
@@ -196,6 +200,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
get :entry, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['subversion_test', 'helloworld.c'])[:param]
|
||||
}
|
||||
assert_response :success
|
||||
@@ -212,6 +217,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
with_settings :file_max_size_displayed => 0 do
|
||||
get :entry, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['subversion_test', 'helloworld.c'])[:param]
|
||||
}
|
||||
assert_response :success
|
||||
@@ -223,10 +229,11 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
def test_entry_should_display_images
|
||||
get :entry, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['subversion_test', 'folder', 'subfolder', 'rubylogo.gif'])[:param]
|
||||
}
|
||||
assert_response :success
|
||||
assert_select 'img[src=?]', '/projects/subproject1/repository/raw/subversion_test/folder/subfolder/rubylogo.gif'
|
||||
assert_select 'img[src=?]', "/projects/subproject1/repository/#{@repository.id}/raw/subversion_test/folder/subfolder/rubylogo.gif"
|
||||
end
|
||||
|
||||
def test_entry_at_given_revision
|
||||
@@ -236,6 +243,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
get :entry, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['subversion_test', 'helloworld.rb'])[:param],
|
||||
:rev => 2
|
||||
}
|
||||
@@ -251,6 +259,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
get :entry, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['subversion_test', 'zzz.c'])[:param]
|
||||
}
|
||||
assert_select 'p#errorExplanation', :text => /The entry or revision was not found in the repository/
|
||||
@@ -263,6 +272,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
get :raw, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['subversion_test', 'helloworld.c'])[:param]
|
||||
}
|
||||
assert_response :success
|
||||
@@ -276,6 +286,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
get :entry, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['subversion_test', 'folder'])[:param]
|
||||
}
|
||||
assert_response :success
|
||||
@@ -287,6 +298,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
def test_revision
|
||||
get :revision, :params => {
|
||||
:id => 1,
|
||||
:repository_id => 10,
|
||||
:rev => 2
|
||||
}
|
||||
assert_response :success
|
||||
@@ -294,9 +306,9 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_select 'ul' do
|
||||
assert_select 'li' do
|
||||
# link to the entry at rev 2
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2/entry/test/some/path/in/the/repo', :text => 'repo'
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/repository/10/revisions/2/entry/test/some/path/in/the/repo', :text => 'repo'
|
||||
# link to partial diff
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2/diff/test/some/path/in/the/repo'
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/repository/10/revisions/2/diff/test/some/path/in/the/repo'
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -308,6 +320,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
get :revision, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:rev => 'something_weird'
|
||||
}
|
||||
assert_response 404
|
||||
@@ -317,6 +330,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
def test_invalid_revision_diff
|
||||
get :diff, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:rev => '1',
|
||||
:rev_to => 'something_weird'
|
||||
}
|
||||
@@ -332,6 +346,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
['', ' ', nil].each do |r|
|
||||
get :revision, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:rev => r
|
||||
}
|
||||
assert_response 404
|
||||
@@ -347,6 +362,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
|
||||
get :revision, :params => {
|
||||
:id => 1,
|
||||
:repository_id => 10,
|
||||
:rev => 2
|
||||
}
|
||||
assert_response :success
|
||||
@@ -354,9 +370,9 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_select 'ul' do
|
||||
assert_select 'li' do
|
||||
# link to the entry at rev 2
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2/entry/path/in/the/repo', :text => 'repo'
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/repository/10/revisions/2/entry/path/in/the/repo', :text => 'repo'
|
||||
# link to partial diff
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2/diff/path/in/the/repo'
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/repository/10/revisions/2/diff/path/in/the/repo'
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -369,6 +385,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
['inline', 'sbs'].each do |dt|
|
||||
get :diff, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:rev => 3,
|
||||
:type => dt
|
||||
}
|
||||
@@ -386,6 +403,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
|
||||
get :diff, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:rev => 5,
|
||||
:format => 'diff'
|
||||
}
|
||||
@@ -402,6 +420,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
['inline', 'sbs'].each do |dt|
|
||||
get :diff, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:rev => 6,
|
||||
:rev_to => 2,
|
||||
:path => repository_path_hash(['subversion_test', 'folder'])[:param],
|
||||
@@ -424,6 +443,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
get :annotate, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:path => repository_path_hash(['subversion_test', 'helloworld.c'])[:param]
|
||||
}
|
||||
assert_response :success
|
||||
@@ -449,6 +469,7 @@ class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
|
||||
assert_equal NUM_REV, @repository.changesets.count
|
||||
get :annotate, :params => {
|
||||
:id => PRJ_ID,
|
||||
:repository_id => @repository.id,
|
||||
:rev => 8,
|
||||
:path => repository_path_hash(['subversion_test', 'helloworld.c'])[:param]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user