diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-05 23:23:04 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-05 23:23:04 +0000 |
commit | 8f24701ae17a6bba0a9e648e38df2d17fb884792 (patch) | |
tree | e9099287e21491d8c2179772f583fd9a178591ad /actionpack/test/controller | |
parent | 57c9630944b43b9d91fd7cc8287253f06bbfaf26 (diff) | |
download | rails-8f24701ae17a6bba0a9e648e38df2d17fb884792.tar.gz rails-8f24701ae17a6bba0a9e648e38df2d17fb884792.tar.bz2 rails-8f24701ae17a6bba0a9e648e38df2d17fb884792.zip |
Fixed send_file/binary_content for testing (closes #8044) [tolsen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8318 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/test_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb index 9b90d69e95..11e48da91c 100644 --- a/actionpack/test/controller/test_test.rb +++ b/actionpack/test/controller/test_test.rb @@ -73,6 +73,10 @@ XML render :text => params[:file].size end + def test_send_file + send_file(File.expand_path(__FILE__)) + end + def redirect_to_same_controller redirect_to :controller => 'test', :action => 'test_uri', :id => 5 end @@ -542,6 +546,11 @@ XML end end + def test_binary_content_works_with_send_file + get :test_send_file + assert_nothing_raised(NoMethodError) { @response.binary_content } + end + protected def with_foo_routing with_routing do |set| |