diff options
| author | Lauro Caetano <laurocaetano1@gmail.com> | 2013-11-28 23:01:57 -0200 | 
|---|---|---|
| committer | Lauro Caetano <laurocaetano1@gmail.com> | 2013-11-30 16:06:52 -0200 | 
| commit | 71d19f15171e59b5dfddd66f3fa3a234c3f7911d (patch) | |
| tree | 9c42fe550754367e05663c3a22fdb5313cfdd08b /actionpack/test/controller | |
| parent | cd4d9316591ab61e478f98e1697599cdffc11d8c (diff) | |
| download | rails-71d19f15171e59b5dfddd66f3fa3a234c3f7911d.tar.gz rails-71d19f15171e59b5dfddd66f3fa3a234c3f7911d.tar.bz2 rails-71d19f15171e59b5dfddd66f3fa3a234c3f7911d.zip | |
Fix stream closing when sending file with `ActionController::Live` included.
Fixes #12381
Diffstat (limited to 'actionpack/test/controller')
| -rw-r--r-- | actionpack/test/controller/send_file_test.rb | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index 8ecc1c7d73..0326bf4562 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -25,6 +25,10 @@ class SendFileController < ActionController::Base    end  end +class SendFileWithActionControllerLive < SendFileController +  include ActionController::Live +end +  class SendFileTest < ActionController::TestCase    tests SendFileController    include TestFileUtils @@ -196,4 +200,14 @@ class SendFileTest < ActionController::TestCase        assert_equal 200, @response.status      end    end + +  tests SendFileWithActionControllerLive + +  def test_send_file_with_action_controller_live +    @controller = SendFileWithActionControllerLive.new +    @controller.options = { :content_type => "application/x-ruby" } + +    response = process('file') +    assert_equal 200, response.status +  end  end | 
