Commit e3e67e63 authored by jplang's avatar jplang

Removes repository routes without repository_id (#26522).

git-svn-id: https://svn.redmine.org/redmine/trunk@17386 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 689c0e7a
......@@ -129,9 +129,7 @@ class Repository < ActiveRecord::Base
end
def identifier_param
if is_default?
nil
elsif identifier.present?
if identifier.present?
identifier
else
id.to_s
......
......@@ -253,21 +253,6 @@ Rails.application.routes.draw do
:constraints => {:rev => /[a-z0-9\.\-_]+/, :path => /.*/}
end
get 'projects/:id/repository/statistics', :to => 'repositories#stats'
get 'projects/:id/repository/graph', :to => 'repositories#graph'
get 'projects/:id/repository/revisions', :to => 'repositories#revisions'
get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision'
get 'projects/:id/repository/revision', :to => 'repositories#revision'
post 'projects/:id/repository/revisions/:rev/issues', :to => 'repositories#add_related_issue'
delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue'
%w(browse show entry raw annotate diff).each do |action|
get "projects/:id/repository/revisions/:rev/#{action}(/*path)",
:controller => 'repositories',
:action => action,
:format => 'html',
:constraints => {:rev => /[a-z0-9\.\-_]+/, :path => /.*/}
end
%w(browse entry raw changes annotate diff).each do |action|
get "projects/:id/repository/:repository_id/#{action}(/*path)",
:controller => 'repositories',
......@@ -275,16 +260,8 @@ Rails.application.routes.draw do
:format => 'html',
:constraints => {:path => /.*/}
end
%w(browse entry raw changes annotate diff).each do |action|
get "projects/:id/repository/#{action}(/*path)",
:controller => 'repositories',
:action => action,
:format => 'html',
:constraints => {:path => /.*/}
end
get 'projects/:id/repository/:repository_id/show/*path', :to => 'repositories#show', :format => 'html', :constraints => {:path => /.*/}
get 'projects/:id/repository/show/*path', :to => 'repositories#show', :format => 'html', :constraints => {:path => /.*/}
get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil
get 'projects/:id/repository', :to => 'repositories#show', :path => nil
......
......@@ -2033,7 +2033,7 @@ class IssuesControllerTest < Redmine::ControllerTest
:id => issue.id
}
assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/3'
assert_select 'a[href=?]', '/projects/ecookbook/repository/10/revisions/3'
end
def test_show_should_display_watchers
......
......@@ -68,6 +68,7 @@ class RepositoriesBazaarControllerTest < Redmine::RepositoryControllerTest
def test_browse_directory
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['directory'])[:param]
}
assert_response :success
......@@ -82,6 +83,7 @@ class RepositoriesBazaarControllerTest < Redmine::RepositoryControllerTest
def test_browse_at_given_revision
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash([])[:param],
:rev => 3
}
......@@ -98,6 +100,7 @@ class RepositoriesBazaarControllerTest < Redmine::RepositoryControllerTest
def test_changes
get :changes, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['doc-mkdir.txt'])[:param]
}
assert_response :success
......@@ -107,6 +110,7 @@ class RepositoriesBazaarControllerTest < Redmine::RepositoryControllerTest
def test_entry_show
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['directory', 'doc-ls.txt'])[:param]
}
assert_response :success
......@@ -117,6 +121,7 @@ class RepositoriesBazaarControllerTest < Redmine::RepositoryControllerTest
def test_entry_download
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['directory', 'doc-ls.txt'])[:param],
:format => 'raw'
}
......@@ -128,6 +133,7 @@ class RepositoriesBazaarControllerTest < Redmine::RepositoryControllerTest
def test_directory_entry
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['directory'])[:param]
}
assert_response :success
......@@ -139,6 +145,7 @@ class RepositoriesBazaarControllerTest < Redmine::RepositoryControllerTest
['inline', 'sbs'].each do |dt|
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => 3,
:type => dt
}
......@@ -151,6 +158,7 @@ class RepositoriesBazaarControllerTest < Redmine::RepositoryControllerTest
def test_annotate
get :annotate, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['doc-mkdir.txt'])[:param]
}
assert_response :success
......
......@@ -182,7 +182,8 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest
def test_revisions
get :revisions, :params => {
:id => 1
:id => 1,
:repository_id => 10
}
assert_response :success
assert_select 'table.changesets'
......@@ -210,6 +211,7 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest
def test_revision
get :revision, :params => {
:id => 1,
:repository_id => 10,
:rev => 1
}
assert_response :success
......@@ -222,6 +224,7 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest
with_settings :commit_logs_formatting => '0' do
get :revision, :params => {
:id => 1,
:repository_id => 10,
:rev => 1
}
assert_response :success
......@@ -235,11 +238,12 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest
get :revision, :params => {
:id => 1,
:repository_id => 10,
:rev => 1
}
assert_response :success
assert_select 'form[action=?]', '/projects/ecookbook/repository/revisions/1/issues' do
assert_select 'form[action=?]', '/projects/ecookbook/repository/10/revisions/1/issues' do
assert_select 'input[name=?]', 'issue_id'
end
end
......@@ -247,6 +251,7 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest
def test_revision_should_not_change_the_project_menu_link
get :revision, :params => {
:id => 1,
:repository_id => 10,
:rev => 1
}
assert_response :success
......@@ -257,13 +262,14 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest
def test_revision_with_before_nil_and_afer_normal
get :revision, :params => {
:id => 1,
:repository_id => 10,
:rev => 1
}
assert_response :success
assert_select 'div.contextual' do
assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/0', 0
assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2'
assert_select 'a[href=?]', '/projects/ecookbook/repository/10/revisions/0', 0
assert_select 'a[href=?]', '/projects/ecookbook/repository/10/revisions/2'
end
end
......@@ -272,6 +278,7 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest
assert_difference 'Changeset.find(103).issues.size' do
post :add_related_issue, :params => {
:id => 1,
:repository_id => 10,
:rev => 4,
:issue_id => 2,
:format => 'js'
......@@ -290,6 +297,7 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest
assert_difference 'Changeset.find(103).issues.size' do
post :add_related_issue, :params => {
:id => 1,
:repository_id => 10,
:rev => 4,
:issue_id => "#2",
:format => 'js'
......@@ -304,6 +312,7 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest
assert_no_difference 'Changeset.find(103).issues.size' do
post :add_related_issue, :params => {
:id => 1,
:repository_id => 10,
:rev => 4,
:issue_id => 9999,
:format => 'js'
......@@ -323,6 +332,7 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest
assert_difference 'Changeset.find(103).issues.size', -1 do
delete :remove_related_issue, :params => {
:id => 1,
:repository_id => 10,
:rev => 4,
:issue_id => 2,
:format => 'js'
......@@ -343,6 +353,7 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest
get :graph, :params => {
:id => 1,
:repository_id => 10,
:graph => 'commits_per_month'
}
assert_response :success
......@@ -356,6 +367,7 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest
def test_graph_commits_per_author
get :graph, :params => {
:id => 1,
:repository_id => 10,
:graph => 'commits_per_author'
}
assert_response :success
......
......@@ -86,6 +86,7 @@ class RepositoriesCvsControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['images'])[:param]
}
assert_response :success
......@@ -105,6 +106,7 @@ class RepositoriesCvsControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['images'])[:param],
:rev => 1
}
......@@ -124,6 +126,7 @@ class RepositoriesCvsControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param]
}
assert_response :success
......@@ -139,6 +142,7 @@ class RepositoriesCvsControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param],
:rev => 2
}
......@@ -155,7 +159,8 @@ class RepositoriesCvsControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :entry, :params => {
:id => PRJ_ID,
:path => repository_path_hash(['sources', 'zzz.c'])[:param]
:repository_id => @repository.id,
:path => repository_path_hash(['sources', 'zzz.c'])[:param]
}
assert_select 'p#errorExplanation', :text => /The entry or revision was not found in the repository/
end
......@@ -167,6 +172,7 @@ class RepositoriesCvsControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param],
:format => 'raw'
}
......@@ -180,6 +186,7 @@ class RepositoriesCvsControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['sources'])[:param]
}
assert_response :success
......@@ -194,6 +201,7 @@ class RepositoriesCvsControllerTest < Redmine::RepositoryControllerTest
['inline', 'sbs'].each do |dt|
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => 3,
:type => dt
}
......@@ -212,6 +220,7 @@ class RepositoriesCvsControllerTest < Redmine::RepositoryControllerTest
['inline', 'sbs'].each do |dt|
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => 1,
:type => dt
}
......@@ -232,6 +241,7 @@ class RepositoriesCvsControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :annotate, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param]
}
assert_response :success
......
......@@ -79,6 +79,7 @@ class RepositoriesFilesystemControllerTest < Redmine::RepositoryControllerTest
def test_show_no_extension
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['test'])[:param]
}
assert_response :success
......@@ -88,6 +89,7 @@ class RepositoriesFilesystemControllerTest < Redmine::RepositoryControllerTest
def test_entry_download_no_extension
get :raw, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['test'])[:param]
}
assert_response :success
......@@ -98,6 +100,7 @@ class RepositoriesFilesystemControllerTest < Redmine::RepositoryControllerTest
with_settings :repositories_encodings => 'UTF-8,EUC-JP' do
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['japanese', 'euc-jp.txt'])[:param]
}
assert_response :success
......@@ -118,6 +121,7 @@ class RepositoriesFilesystemControllerTest < Redmine::RepositoryControllerTest
with_settings :repositories_encodings => enc do
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['japanese', 'utf-16.txt'])[:param]
}
assert_response :success
......@@ -129,6 +133,7 @@ class RepositoriesFilesystemControllerTest < Redmine::RepositoryControllerTest
with_settings :file_max_size_displayed => 1 do
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['japanese', 'big-file.txt'])[:param]
}
assert_response :success
......
......@@ -145,6 +145,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => 'test_branch'
}
assert_response :success
......@@ -173,6 +174,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
].each do |t1|
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => t1
}
assert_response :success
......@@ -189,6 +191,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['images'])[:param]
}
assert_response :success
......@@ -207,6 +210,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['images'])[:param],
:rev => '7234cb2750b63f47bff735edc50a1c0a433c2518'
}
......@@ -221,6 +225,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
def test_changes
get :changes, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['images', 'edit.png'])[:param]
}
assert_response :success
......@@ -230,6 +235,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
def test_entry_show
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param]
}
assert_response :success
......@@ -249,6 +255,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1|
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['latin-1-dir', "test-#{CHAR_1_HEX}.txt"])[:param],
:rev => r1
}
......@@ -262,6 +269,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
def test_entry_download
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param],
:format => 'raw'
}
......@@ -273,6 +281,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
def test_directory_entry
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['sources'])[:param]
}
assert_response :success
......@@ -293,6 +302,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
['inline', 'sbs'].each do |dt|
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7',
:type => dt
}
......@@ -313,6 +323,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
['inline', 'sbs'].each do |dt|
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7',
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param],
:type => dt
......@@ -337,6 +348,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
with_settings :default_language => 'en' do
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:type => 'inline',
:rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'
}
......@@ -346,6 +358,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
with_settings :default_language => 'fr' do
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:type => 'inline',
:rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'
}
......@@ -365,13 +378,14 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
['inline', 'sbs'].each do |dt|
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => '61b685fbe55ab05b5ac68402d5720c1a6ac973d1',
:rev_to => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7',
:type => dt
}
assert_response :success
assert_select 'h2', :text => /2f9c0091:61b685fb/
assert_select 'form[action=?]', '/projects/subproject1/repository/revisions/61b685fbe55ab05b5ac68402d5720c1a6ac973d1/diff'
assert_select 'form[action=?]', "/projects/subproject1/repository/#{@repository.id}/revisions/61b685fbe55ab05b5ac68402d5720c1a6ac973d1/diff"
assert_select 'input#rev_to[type=hidden][name=rev_to][value=?]', '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'
end
end
......@@ -407,6 +421,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
['inline', 'sbs'].each do |dt|
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => r1,
:type => dt
}
......@@ -424,6 +439,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
def test_diff_should_show_filenames
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => 'deff712f05a90d96edbd70facc47d944be5897e3',
:type => 'inline'
}
......@@ -444,6 +460,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
@request.session[:user_id] = 1 # admin
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'
}
assert_response :success
......@@ -451,6 +468,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
assert_equal "inline", user.pref[:diff_type]
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7',
:type => 'sbs'
}
......@@ -462,6 +480,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
def test_annotate
get :annotate, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param]
}
assert_response :success
......@@ -482,6 +501,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :annotate, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => 'deff7',
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param]
}
......@@ -493,6 +513,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
with_settings :default_language => 'en' do
get :annotate, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['images', 'edit.png'])[:param]
}
assert_response :success
......@@ -504,6 +525,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
with_settings :file_max_size_displayed => 1 do
get :annotate, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param],
:rev => 'deff712f'
}
......@@ -512,6 +534,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
get :annotate, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['README'])[:param],
:rev => '7234cb2'
}
......@@ -531,6 +554,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1|
get :annotate, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['latin-1-dir', "test-#{CHAR_1_HEX}.txt"])[:param],
:rev => r1
}
......@@ -552,6 +576,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
['83ca5fd546063a3c7dc2e568ba3355661a9e2b2c', '83ca5fd546063a'].each do |r1|
get :annotate, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash([" filename with a leading space.txt "])[:param],
:rev => r1
}
......@@ -573,9 +598,10 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
@project.reload
assert_equal NUM_REV, @repository.changesets.count
get :revisions, :params => {
:id => PRJ_ID
:id => PRJ_ID,
:repository_id => @repository.id
}
assert_select 'form[method=get][action=?]', '/projects/subproject1/repository/revision'
assert_select 'form[method=get][action=?]', "/projects/subproject1/repository/#{@repository.id}/revision"
end
def test_revision
......@@ -586,6 +612,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
['61b685fbe55ab05b5ac68402d5720c1a6ac973d1', '61b685f'].each do |r|
get :revision, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => r
}
assert_response :success
......@@ -600,6 +627,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
['', ' ', nil].each do |r|
get :revision, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => r
}
assert_response 404
......
......@@ -97,6 +97,7 @@ class RepositoriesMercurialControllerTest < Redmine::RepositoryControllerTest
assert_equal NUM_REV, @repository.changesets.count
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['images'])[:param]
}
assert_response :success
......@@ -120,6 +121,7 @@ class RepositoriesMercurialControllerTest < Redmine::RepositoryControllerTest
[0, '0', '0885933ad4f6'].each do |r1|
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['images'])[:param],
:rev => r1
}
......@@ -144,6 +146,7 @@ class RepositoriesMercurialControllerTest < Redmine::RepositoryControllerTest
[13, '13', '3a330eb32958'].each do |r1|
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['sql_escape', 'percent%dir'])[:param],
:rev => r1
}
......@@ -172,6 +175,7 @@ class RepositoriesMercurialControllerTest < Redmine::RepositoryControllerTest
[21, '21', 'adf805632193'].each do |r1|
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['latin-1-dir'])[:param],
:rev => r1
}
......@@ -223,6 +227,7 @@ class RepositoriesMercurialControllerTest < Redmine::RepositoryControllerTest
].each do |bra|
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => bra
}
assert_response :success
......@@ -244,6 +249,7 @@ class RepositoriesMercurialControllerTest < Redmine::RepositoryControllerTest
].each do |tag|
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => tag
}