summaryrefslogtreecommitdiffstats
path: root/test/functional/repositories_subversion_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-02-21 16:04:51 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-02-21 16:04:51 +0000
commit1c5a2ddfb07cd4993fa9f28542df51a399e29a6c (patch)
tree201ae4a82eb6d67214051952125a8dbd0de76570 /test/functional/repositories_subversion_controller_test.rb
parent79c074dbe59001233947db7a32afe04e11be0fad (diff)
downloadredmine-1c5a2ddfb07cd4993fa9f28542df51a399e29a6c.tar.gz
redmine-1c5a2ddfb07cd4993fa9f28542df51a399e29a6c.zip
Limit the size of repository files displayed inline too.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2505 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/repositories_subversion_controller_test.rb')
-rw-r--r--test/functional/repositories_subversion_controller_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb
index a3918a922..c2bb40367 100644
--- a/test/functional/repositories_subversion_controller_test.rb
+++ b/test/functional/repositories_subversion_controller_test.rb
@@ -94,6 +94,16 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase
assert_response :success
assert_template 'entry'
end
+
+ def test_entry_should_send_if_too_big
+ # no files in the test repo is larger than 1KB...
+ with_settings :file_max_size_displayed => 0 do
+ get :entry, :id => 1, :path => ['subversion_test', 'helloworld.c']
+ assert_response :success
+ assert_template ''
+ assert_equal 'attachment; filename="helloworld.c"', @response.headers['Content-Disposition']
+ end
+ end
def test_entry_at_given_revision
get :entry, :id => 1, :path => ['subversion_test', 'helloworld.rb'], :rev => 2
@@ -113,6 +123,8 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase
def test_entry_download
get :entry, :id => 1, :path => ['subversion_test', 'helloworld.c'], :format => 'raw'
assert_response :success
+ assert_template ''
+ assert_equal 'attachment; filename="helloworld.c"', @response.headers['Content-Disposition']
end
def test_directory_entry