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
This commit is contained in:
Jean-Philippe Lang
2016-05-08 08:02:23 +00:00
parent d8d23fbb6b
commit 3d2c198c0f
8 changed files with 28 additions and 19 deletions

View File

@@ -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