diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb index f94c73280..ff2838931 100644 --- a/test/functional/attachments_controller_test.rb +++ b/test/functional/attachments_controller_test.rb @@ -46,7 +46,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest assert_select 'th.filename', :text => /issues_controller.rb\t\(révision 1484\)/ assert_select 'td.line-code', :text => /Demande créée avec succès/ end - set_tmp_attachments_directory end def test_show_diff_replace_cannot_convert_content @@ -64,7 +63,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest assert_select 'td.line-code', :text => /Demande cr\?\?e avec succ\?s/ end end - set_tmp_attachments_directory end def test_show_diff_latin_1 @@ -82,7 +80,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest assert_select 'td.line-code', :text => /Demande créée avec succès/ end end - set_tmp_attachments_directory end def test_show_should_save_diff_type_as_user_preference @@ -132,7 +129,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest } assert_response :success assert_equal 'text/html', @response.content_type - set_tmp_attachments_directory end def test_show_text_file_utf_8 @@ -207,7 +203,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest assert_equal 'text/html', @response.content_type assert_select '.nodata', :text => 'No preview available. Download the file instead.' end - set_tmp_attachments_directory end def test_show_image @@ -227,7 +222,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest } assert_equal 'text/html', @response.content_type assert_select '.nodata', :text => 'No preview available. Download the file instead.' - set_tmp_attachments_directory end def test_show_file_from_private_issue_without_permission @@ -235,7 +229,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest :id => 15 } assert_redirected_to '/login?back_url=http%3A%2F%2Ftest.host%2Fattachments%2F15' - set_tmp_attachments_directory end def test_show_file_from_private_issue_with_permission @@ -245,7 +238,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest } assert_response :success assert_select 'h2', :text => /private.diff/ - set_tmp_attachments_directory end def test_show_file_without_container_should_be_allowed_to_author @@ -291,8 +283,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest assert_select 'ul.pages li.next', :text => /next/i assert_select 'ul.pages li.previous', :text => /previous/i - - set_tmp_attachments_directory end def test_download_text_file @@ -309,8 +299,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest :id => 4 } assert_response 304 - - set_tmp_attachments_directory end def test_download_js_file @@ -344,7 +332,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest } assert_response :success assert_equal 'text/x-ruby', @response.content_type - set_tmp_attachments_directory end def test_download_should_assign_better_content_type_than_application_octet_stream @@ -355,7 +342,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest } assert_response :success assert_equal 'text/x-ruby', @response.content_type - set_tmp_attachments_directory end def test_download_should_assign_application_octet_stream_if_content_type_is_not_determined @@ -365,7 +351,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest assert_response :success assert_nil Redmine::MimeType.of(attachments(:attachments_022).filename) assert_equal 'application/octet-stream', @response.content_type - set_tmp_attachments_directory end def test_download_missing_file @@ -373,7 +358,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest :id => 2 } assert_response 404 - set_tmp_attachments_directory end def test_download_should_be_denied_without_permission @@ -381,7 +365,6 @@ class AttachmentsControllerTest < Redmine::ControllerTest :id => 7 } assert_redirected_to '/login?back_url=http%3A%2F%2Ftest.host%2Fattachments%2Fdownload%2F7' - set_tmp_attachments_directory end if convert_installed? diff --git a/test/integration/api_test/attachments_test.rb b/test/integration/api_test/attachments_test.rb index f347b396a..af2b397cf 100644 --- a/test/integration/api_test/attachments_test.rb +++ b/test/integration/api_test/attachments_test.rb @@ -61,20 +61,17 @@ class Redmine::ApiTest::AttachmentsTest < Redmine::ApiTest::Base test "GET /attachments/:id.xml should deny access without credentials" do get '/attachments/7.xml' assert_response 401 - set_tmp_attachments_directory end test "GET /attachments/download/:id/:filename should return the attachment content" do get '/attachments/download/7/archive.zip', :headers => credentials('jsmith') assert_response :success assert_equal 'application/zip', @response.content_type - set_tmp_attachments_directory end test "GET /attachments/download/:id/:filename should deny access without credentials" do get '/attachments/download/7/archive.zip' assert_response 401 - set_tmp_attachments_directory end test "GET /attachments/thumbnail/:id should return the thumbnail" do