Fixed: Links to repository directories don't work (#1119).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1365 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-04-27 10:12:15 +00:00
parent 6a3236daea
commit a73f68a185
13 changed files with 60 additions and 55 deletions

View File

@@ -99,6 +99,14 @@ class RepositoriesBazaarControllerTest < Test::Unit::TestCase
assert @response.body.include?('Show help message')
end
def test_directory_entry
get :entry, :id => 3, :path => ['directory']
assert_response :success
assert_template 'browse'
assert_not_nil assigns(:entry)
assert_equal 'directory', assigns(:entry).name
end
def test_diff
# Full diff of changeset 3
get :diff, :id => 3, :rev => 3

View File

@@ -101,6 +101,14 @@ class RepositoriesCvsControllerTest < Test::Unit::TestCase
get :entry, :id => 1, :path => ['sources', 'watchers_controller.rb'], :format => 'raw'
assert_response :success
end
def test_directory_entry
get :entry, :id => 1, :path => ['sources']
assert_response :success
assert_template 'browse'
assert_not_nil assigns(:entry)
assert_equal 'sources', assigns(:entry).name
end
def test_diff
Project.find(1).repository.fetch_changesets

View File

@@ -101,6 +101,14 @@ class RepositoriesGitControllerTest < Test::Unit::TestCase
assert @response.body.include?('WITHOUT ANY WARRANTY')
end
def test_directory_entry
get :entry, :id => 3, :path => ['sources']
assert_response :success
assert_template 'browse'
assert_not_nil assigns(:entry)
assert_equal 'sources', assigns(:entry).name
end
def test_diff
# Full diff of changeset 2f9c0091
get :diff, :id => 3, :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7'

View File

@@ -99,7 +99,15 @@ class RepositoriesMercurialControllerTest < Test::Unit::TestCase
# File content
assert @response.body.include?('WITHOUT ANY WARRANTY')
end
def test_directory_entry
get :entry, :id => 3, :path => ['sources']
assert_response :success
assert_template 'browse'
assert_not_nil assigns(:entry)
assert_equal 'sources', assigns(:entry).name
end
def test_diff
# Full diff of changeset 4
get :diff, :id => 3, :rev => 4

View File

@@ -89,6 +89,14 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase
assert_response :success
end
def test_directory_entry
get :entry, :id => 1, :path => ['subversion_test', 'folder']
assert_response :success
assert_template 'browse'
assert_not_nil assigns(:entry)
assert_equal 'folder', assigns(:entry).name
end
def test_diff
get :diff, :id => 1, :rev => 3
assert_response :success