summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-04-27 10:12:15 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-04-27 10:12:15 +0000
commita73f68a185df00db1aaa153f576f106ee752c54d (patch)
tree09fab2647035c64e944b7df68e78618eeb6966be /test/functional
parent6a3236daea38f0cf8b62ccf9f1212eb0f0395b08 (diff)
downloadredmine-a73f68a185df00db1aaa153f576f106ee752c54d.tar.gz
redmine-a73f68a185df00db1aaa153f576f106ee752c54d.zip
Fixed: Links to repository directories don't work (#1119).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1365 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/repositories_bazaar_controller_test.rb8
-rw-r--r--test/functional/repositories_cvs_controller_test.rb8
-rw-r--r--test/functional/repositories_git_controller_test.rb8
-rw-r--r--test/functional/repositories_mercurial_controller_test.rb10
-rw-r--r--test/functional/repositories_subversion_controller_test.rb8
5 files changed, 41 insertions, 1 deletions
diff --git a/test/functional/repositories_bazaar_controller_test.rb b/test/functional/repositories_bazaar_controller_test.rb
index 5a473bab3..acb6c1d21 100644
--- a/test/functional/repositories_bazaar_controller_test.rb
+++ b/test/functional/repositories_bazaar_controller_test.rb
@@ -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
diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb
index d6181ad36..e12bb53ac 100644
--- a/test/functional/repositories_cvs_controller_test.rb
+++ b/test/functional/repositories_cvs_controller_test.rb
@@ -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
diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb
index 10a4950f3..339e22897 100644
--- a/test/functional/repositories_git_controller_test.rb
+++ b/test/functional/repositories_git_controller_test.rb
@@ -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'
diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb
index b09265d13..cb870aa32 100644
--- a/test/functional/repositories_mercurial_controller_test.rb
+++ b/test/functional/repositories_mercurial_controller_test.rb
@@ -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
diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb
index adb69c8e9..dd56947fc 100644
--- a/test/functional/repositories_subversion_controller_test.rb
+++ b/test/functional/repositories_subversion_controller_test.rb
@@ -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