fix source indent of AttachmentsControllerTest

git-svn-id: http://svn.redmine.org/redmine/trunk@20082 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2020-09-26 15:01:54 +00:00
parent 8df1fc3544
commit 4bf1745cd8

View File

@@ -579,10 +579,13 @@ class AttachmentsControllerTest < Redmine::ControllerTest
def test_download_all_with_valid_container
@request.session[:user_id] = 2
get :download_all, :params => {
get(
:download_all,
:params => {
:object_type => 'issues',
:object_id => '2'
}
)
assert_response 200
assert_equal response.headers['Content-Type'], 'application/zip'
assert_match /issue-2-attachments.zip/, response.headers['Content-Disposition']
@@ -591,19 +594,25 @@ class AttachmentsControllerTest < Redmine::ControllerTest
def test_download_all_with_invalid_container
@request.session[:user_id] = 2
get :download_all, :params => {
get(
:download_all,
:params => {
:object_type => 'issues',
:object_id => '999'
}
)
assert_response 404
end
def test_download_all_without_readable_attachments
@request.session[:user_id] = 2
get :download_all, :params => {
get(
:download_all,
:params => {
:object_type => 'issues',
:object_id => '1'
}
)
assert_equal Issue.find(1).attachments, []
assert_response 404
end
@@ -611,11 +620,14 @@ class AttachmentsControllerTest < Redmine::ControllerTest
def test_download_all_with_maximum_bulk_download_size_larger_than_attachments
with_settings :bulk_download_max_size => 0 do
@request.session[:user_id] = 2
get :download_all, :params => {
get(
:download_all,
:params => {
:object_type => 'issues',
:object_id => '2',
:back_url => '/issues/2'
}
}
)
assert_redirected_to '/issues/2'
assert_equal flash[:error], 'These attachments cannot be bulk downloaded because the total file size exceeds the maximum allowed size (0 Bytes)'
end