aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/send_file_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/send_file_test.rb')
-rw-r--r--actionpack/test/controller/send_file_test.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb
index ce144cc24b..30c9a65b7c 100644
--- a/actionpack/test/controller/send_file_test.rb
+++ b/actionpack/test/controller/send_file_test.rb
@@ -74,18 +74,6 @@ class SendFileTest < ActionController::TestCase
assert_equal "attachment", response.headers["Content-Disposition"]
end
- def test_x_sendfile_header
- @controller.options = { :x_sendfile => true }
-
- response = nil
- assert_nothing_raised { response = process('file') }
- assert_not_nil response
-
- assert_equal @controller.file_path, response.headers['X-Sendfile']
- assert response.body.blank?
- assert !response.etag?
- end
-
def test_data
response = nil
assert_nothing_raised { response = process('data') }
@@ -106,7 +94,6 @@ class SendFileTest < ActionController::TestCase
# Test that send_file_headers! is setting the correct HTTP headers.
def test_send_file_headers_bang
options = {
- :length => 1,
:type => Mime::PNG,
:disposition => 'disposition',
:filename => 'filename'
@@ -121,7 +108,6 @@ class SendFileTest < ActionController::TestCase
@controller.send(:send_file_headers!, options)
h = @controller.headers
- assert_equal '1', h['Content-Length']
assert_equal 'image/png', @controller.content_type
assert_equal 'disposition; filename="filename"', h['Content-Disposition']
assert_equal 'binary', h['Content-Transfer-Encoding']
@@ -134,7 +120,6 @@ class SendFileTest < ActionController::TestCase
def test_send_file_headers_with_mime_lookup_with_symbol
options = {
- :length => 1,
:type => :png
}
@@ -147,7 +132,6 @@ class SendFileTest < ActionController::TestCase
def test_send_file_headers_with_bad_symbol
options = {
- :length => 1,
:type => :this_type_is_not_registered
}
@@ -174,11 +158,4 @@ class SendFileTest < ActionController::TestCase
assert_equal 200, @response.status
end
end
-
- def test_send_data_content_length_header
- @controller.headers = {}
- @controller.options = { :type => :text, :filename => 'file_with_utf8_text' }
- process('multibyte_text_data')
- assert_equal '29', @controller.headers['Content-Length']
- end
end