summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-03-19 17:51:13 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-03-19 17:51:13 +0000
commitf162337e1b3625da7eedb747f1b2bb4752c27646 (patch)
treede961a92fadf7cdf1f5b56f41c77ac4411945775 /test/functional
parent93a33c62862d723722106fd7c624bb3e830085f6 (diff)
downloadredmine-f162337e1b3625da7eedb747f1b2bb4752c27646.tar.gz
redmine-f162337e1b3625da7eedb747f1b2bb4752c27646.zip
Always show 'View' and 'Annotate' links on repository files (download will be forced when clicking 'View' if the file is binary).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1274 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/repositories_cvs_controller_test.rb2
-rw-r--r--test/functional/repositories_git_controller_test.rb7
-rw-r--r--test/functional/repositories_subversion_controller_test.rb2
3 files changed, 9 insertions, 2 deletions
diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb
index 059823707..1e101f59a 100644
--- a/test/functional/repositories_cvs_controller_test.rb
+++ b/test/functional/repositories_cvs_controller_test.rb
@@ -83,7 +83,7 @@ class RepositoriesCvsControllerTest < Test::Unit::TestCase
def test_entry_not_found
get :entry, :id => 1, :path => ['sources', 'zzz.c']
assert_tag :tag => 'div', :attributes => { :class => /error/ },
- :content => /Entry and\/or revision doesn't exist/
+ :content => /The entry or revision was not found in the repository/
end
def test_entry_download
diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb
index fec0bbaa0..f8b3cb2bb 100644
--- a/test/functional/repositories_git_controller_test.rb
+++ b/test/functional/repositories_git_controller_test.rb
@@ -116,6 +116,13 @@ class RepositoriesGitControllerTest < Test::Unit::TestCase
:sibling => { :tag => 'td', :content => /jsmith/ },
:sibling => { :tag => 'td', :content => /watcher =/ }
end
+
+ def test_annotate_binary_file
+ get :annotate, :id => 3, :path => ['images', 'delete.png']
+ assert_response 500
+ assert_tag :tag => 'div', :attributes => { :class => /error/ },
+ :content => /can not be annotated/
+ end
else
puts "Git test repository NOT FOUND. Skipping functional tests !!!"
def test_fake; assert true end
diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb
index a70682818..9b21a13e8 100644
--- a/test/functional/repositories_subversion_controller_test.rb
+++ b/test/functional/repositories_subversion_controller_test.rb
@@ -72,7 +72,7 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase
def test_entry_not_found
get :entry, :id => 1, :path => ['subversion_test', 'zzz.c']
assert_tag :tag => 'div', :attributes => { :class => /error/ },
- :content => /Entry and\/or revision doesn't exist/
+ :content => /The entry or revision was not found in the repository/
end
def test_entry_download