summaryrefslogtreecommitdiffstats
path: root/test/functional/attachments_controller_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-09-20 01:31:13 +0000
committerGo MAEDA <maeda@farend.jp>2019-09-20 01:31:13 +0000
commit1e53dd7e11fb280487550bc55b35ff4433213f62 (patch)
tree5028ad976a7b0c102aa81b0299d67964b619c1d1 /test/functional/attachments_controller_test.rb
parent43b889d50c55e12578ba9a00118bfc71df0e9b08 (diff)
downloadredmine-1e53dd7e11fb280487550bc55b35ff4433213f62.tar.gz
redmine-1e53dd7e11fb280487550bc55b35ff4433213f62.zip
Fixes not to call set_tmp_attachments_directory twice after each test (#32094).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@18484 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/attachments_controller_test.rb')
-rw-r--r--test/functional/attachments_controller_test.rb17
1 files changed, 0 insertions, 17 deletions
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?