diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-05-08 08:02:23 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-05-08 08:02:23 +0000 |
commit | 3d2c198c0f889e73ae2a16a068c41948b40cefff (patch) | |
tree | c764f9e787428d113cc37201f93e2c0e719e259d /test/functional | |
parent | d8d23fbb6b23f15c6c5cc0a65ebfdf99c06e1a9b (diff) | |
download | redmine-3d2c198c0f889e73ae2a16a068c41948b40cefff.tar.gz redmine-3d2c198c0f889e73ae2a16a068c41948b40cefff.zip |
Add view for "no preview" repository files (#22482).
Patch by Gregor Schmidt.
git-svn-id: http://svn.redmine.org/redmine/trunk@15397 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/repositories_filesystem_controller_test.rb | 5 | ||||
-rw-r--r-- | test/functional/repositories_subversion_controller_test.rb | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/test/functional/repositories_filesystem_controller_test.rb b/test/functional/repositories_filesystem_controller_test.rb index 6d872cdf0..87c6cd266 100644 --- a/test/functional/repositories_filesystem_controller_test.rb +++ b/test/functional/repositories_filesystem_controller_test.rb @@ -107,12 +107,13 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase end end - def test_show_text_file_should_send_if_too_big + def test_show_text_file_should_show_other_if_too_big with_settings :file_max_size_displayed => 1 do get :entry, :id => PRJ_ID, :path => repository_path_hash(['japanese', 'big-file.txt'])[:param] assert_response :success - assert_equal 'text/plain', @response.content_type + assert_equal 'text/html', @response.content_type + assert_select 'p.nodata' end end diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb index 41ea3ed37..9eef38e3e 100644 --- a/test/functional/repositories_subversion_controller_test.rb +++ b/test/functional/repositories_subversion_controller_test.rb @@ -168,7 +168,7 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase assert_template 'entry' end - def test_entry_should_send_if_too_big + def test_entry_should_show_other_if_too_big assert_equal 0, @repository.changesets.count @repository.fetch_changesets @project.reload @@ -178,8 +178,8 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase get :entry, :id => PRJ_ID, :path => repository_path_hash(['subversion_test', 'helloworld.c'])[:param] assert_response :success - assert_equal 'attachment; filename="helloworld.c"', - @response.headers['Content-Disposition'] + assert_equal 'text/html', @response.content_type + assert_select 'p.nodata' end end |