aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-06-15 11:21:08 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-06-15 11:21:08 -0700
commit5a8a550a45c5ca7abc9785ed180d5f46189c9958 (patch)
tree57e604e8485e34a6d7058c8f243e941d38bca949 /actionpack/test
parentc50b03b754948b676b74c334edfb277fa45c1d14 (diff)
downloadrails-5a8a550a45c5ca7abc9785ed180d5f46189c9958.tar.gz
rails-5a8a550a45c5ca7abc9785ed180d5f46189c9958.tar.bz2
rails-5a8a550a45c5ca7abc9785ed180d5f46189c9958.zip
Finish making things pass with updated internal content_type semantics
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/content_type_test.rb4
-rw-r--r--actionpack/test/controller/send_file_test.rb10
2 files changed, 6 insertions, 8 deletions
diff --git a/actionpack/test/controller/content_type_test.rb b/actionpack/test/controller/content_type_test.rb
index d622ac1e85..511788aec8 100644
--- a/actionpack/test/controller/content_type_test.rb
+++ b/actionpack/test/controller/content_type_test.rb
@@ -83,14 +83,14 @@ class ContentTypeTest < ActionController::TestCase
# :ported:
def test_content_type_from_body
get :render_content_type_from_body
- assert_equal "application/rss+xml", @response.content_type
+ assert_equal Mime::RSS, @response.content_type
assert_equal "utf-8", @response.charset
end
# :ported:
def test_content_type_from_render
get :render_content_type_from_render
- assert_equal "application/rss+xml", @response.content_type
+ assert_equal Mime::RSS, @response.content_type
assert_equal "utf-8", @response.charset
end
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb
index 0bc0eb2df6..4134da3b9e 100644
--- a/actionpack/test/controller/send_file_test.rb
+++ b/actionpack/test/controller/send_file_test.rb
@@ -91,10 +91,10 @@ class SendFileTest < ActionController::TestCase
def test_headers_after_send_shouldnt_include_charset
response = process('data')
- assert_equal "application/octet-stream", response.content_type
+ assert_equal "application/octet-stream", response.headers["Content-Type"]
response = process('file')
- assert_equal "application/octet-stream", response.content_type
+ assert_equal "application/octet-stream", response.headers["Content-Type"]
end
# Test that send_file_headers! is setting the correct HTTP headers.
@@ -116,7 +116,7 @@ class SendFileTest < ActionController::TestCase
h = @controller.headers
assert_equal 1, h['Content-Length']
- assert_equal 'image/png', h['Content-Type']
+ assert_equal 'image/png', @controller.content_type
assert_equal 'disposition; filename="filename"', h['Content-Disposition']
assert_equal 'binary', h['Content-Transfer-Encoding']
@@ -136,9 +136,7 @@ class SendFileTest < ActionController::TestCase
@controller.headers = {}
@controller.send(:send_file_headers!, options)
- headers = @controller.headers
-
- assert_equal 'image/png', headers['Content-Type']
+ assert_equal 'image/png', @controller.content_type
end