diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-23 16:44:00 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-23 16:44:00 -0700 |
commit | 10762e9e550a8221ae4b28e6274fd01992004591 (patch) | |
tree | ded61bc241235c3a0b2bceabc9e06d081e11365a /actionpack | |
parent | 208956c0d014b6e4c560ac40145fdac97c72aa39 (diff) | |
download | rails-10762e9e550a8221ae4b28e6274fd01992004591.tar.gz rails-10762e9e550a8221ae4b28e6274fd01992004591.tar.bz2 rails-10762e9e550a8221ae4b28e6274fd01992004591.zip |
call `get` instead of controller.process
we want the request to go through the test harness, not directly call
the methods on the controller
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/live_stream_test.rb | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/actionpack/test/controller/live_stream_test.rb b/actionpack/test/controller/live_stream_test.rb index 5abf9aea81..4d1c23cbee 100644 --- a/actionpack/test/controller/live_stream_test.rb +++ b/actionpack/test/controller/live_stream_test.rb @@ -320,20 +320,18 @@ module ActionController def test_ignore_client_disconnect @controller.latch = Concurrent::CountDownLatch.new - @controller.request = @request - @controller.response = @response + capture_log_output do |output| + get :ignore_client_disconnect - t = Thread.new(@response) { |resp| - resp.await_commit - _, _, body = resp.to_a - body.each do - body.close - break - end - } + t = Thread.new(response) { |resp| + resp.await_commit + _, _, body = resp.to_a + body.each do + body.close + break + end + } - capture_log_output do |output| - @controller.process :ignore_client_disconnect t.join Timeout.timeout(3) do @controller.latch.wait |