mirror of
https://github.com/redmine/redmine.git
synced 2025-12-20 15:30:44 +01:00
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:
@@ -579,10 +579,13 @@ class AttachmentsControllerTest < Redmine::ControllerTest
|
|||||||
|
|
||||||
def test_download_all_with_valid_container
|
def test_download_all_with_valid_container
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
get :download_all, :params => {
|
get(
|
||||||
|
:download_all,
|
||||||
|
:params => {
|
||||||
:object_type => 'issues',
|
:object_type => 'issues',
|
||||||
:object_id => '2'
|
:object_id => '2'
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response 200
|
assert_response 200
|
||||||
assert_equal response.headers['Content-Type'], 'application/zip'
|
assert_equal response.headers['Content-Type'], 'application/zip'
|
||||||
assert_match /issue-2-attachments.zip/, response.headers['Content-Disposition']
|
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
|
def test_download_all_with_invalid_container
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
get :download_all, :params => {
|
get(
|
||||||
|
:download_all,
|
||||||
|
:params => {
|
||||||
:object_type => 'issues',
|
:object_type => 'issues',
|
||||||
:object_id => '999'
|
:object_id => '999'
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_response 404
|
assert_response 404
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_download_all_without_readable_attachments
|
def test_download_all_without_readable_attachments
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
get :download_all, :params => {
|
get(
|
||||||
|
:download_all,
|
||||||
|
:params => {
|
||||||
:object_type => 'issues',
|
:object_type => 'issues',
|
||||||
:object_id => '1'
|
:object_id => '1'
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_equal Issue.find(1).attachments, []
|
assert_equal Issue.find(1).attachments, []
|
||||||
assert_response 404
|
assert_response 404
|
||||||
end
|
end
|
||||||
@@ -611,11 +620,14 @@ class AttachmentsControllerTest < Redmine::ControllerTest
|
|||||||
def test_download_all_with_maximum_bulk_download_size_larger_than_attachments
|
def test_download_all_with_maximum_bulk_download_size_larger_than_attachments
|
||||||
with_settings :bulk_download_max_size => 0 do
|
with_settings :bulk_download_max_size => 0 do
|
||||||
@request.session[:user_id] = 2
|
@request.session[:user_id] = 2
|
||||||
get :download_all, :params => {
|
get(
|
||||||
|
:download_all,
|
||||||
|
:params => {
|
||||||
:object_type => 'issues',
|
:object_type => 'issues',
|
||||||
:object_id => '2',
|
:object_id => '2',
|
||||||
:back_url => '/issues/2'
|
:back_url => '/issues/2'
|
||||||
}
|
}
|
||||||
|
)
|
||||||
assert_redirected_to '/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)'
|
assert_equal flash[:error], 'These attachments cannot be bulk downloaded because the total file size exceeds the maximum allowed size (0 Bytes)'
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user