aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/send_file_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-02-19 02:25:01 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-02-19 02:25:01 +0000
commit9e4c8b88584ba09c46abcd484969da6244416946 (patch)
treed09b4b372c66fe1e07770b8d6fcfa3575f39122c /actionpack/test/controller/send_file_test.rb
parent94fa0ed053a92b4dc48501d7dc7e7ebcec7e1ca6 (diff)
downloadrails-9e4c8b88584ba09c46abcd484969da6244416946.tar.gz
rails-9e4c8b88584ba09c46abcd484969da6244416946.tar.bz2
rails-9e4c8b88584ba09c46abcd484969da6244416946.zip
Fix tests depending too deep
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/send_file_test.rb')
-rw-r--r--actionpack/test/controller/send_file_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb
index 77f1c3614b..86f83d4539 100644
--- a/actionpack/test/controller/send_file_test.rb
+++ b/actionpack/test/controller/send_file_test.rb
@@ -73,10 +73,10 @@ class SendFileTest < Test::Unit::TestCase
def test_headers_after_send_shouldnt_include_charset
response = process('data')
- assert_equal "application/octet-stream", response.headers["Content-Type"]
+ assert_equal "application/octet-stream", response.content_type
response = process('file')
- assert_equal "application/octet-stream", response.headers["Content-Type"]
+ assert_equal "application/octet-stream", response.content_type
end
# Test that send_file_headers! is setting the correct HTTP headers.
@@ -113,13 +113,13 @@ class SendFileTest < Test::Unit::TestCase
define_method "test_send_#{method}_status" do
@controller.options = { :stream => false, :status => 500 }
assert_nothing_raised { assert_not_nil process(method) }
- assert_equal '500 Internal Server Error', @controller.headers['Status']
+ assert_equal '500 Internal Server Error', @response.headers['Status']
end
define_method "test_default_send_#{method}_status" do
@controller.options = { :stream => false }
assert_nothing_raised { assert_not_nil process(method) }
- assert_equal ActionController::Base::DEFAULT_RENDER_STATUS_CODE, @controller.headers['Status']
+ assert_equal ActionController::Base::DEFAULT_RENDER_STATUS_CODE, @response.headers['Status']
end
end
end