aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/new_base
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/new_base')
-rw-r--r--actionpack/test/controller/new_base/render_streaming_test.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/actionpack/test/controller/new_base/render_streaming_test.rb b/actionpack/test/controller/new_base/render_streaming_test.rb
index 27ba4b1a29..ffc4b331ec 100644
--- a/actionpack/test/controller/new_base/render_streaming_test.rb
+++ b/actionpack/test/controller/new_base/render_streaming_test.rb
@@ -8,11 +8,15 @@ module RenderStreaming
)]
layout "application"
- stream :only => :hello_world
+ stream :only => [:hello_world, :skip]
def hello_world
end
+ def skip
+ render :action => "hello_world", :stream => false
+ end
+
def explicit
render :action => "hello_world", :stream => true
end
@@ -52,11 +56,16 @@ module RenderStreaming
assert_streaming!
end
+ test "skip rendering with streaming at render level" do
+ get "/render_streaming/basic/skip"
+ assert_body "Hello world, I'm here!"
+ end
+
def assert_streaming!(cache="no-cache")
assert_status 200
assert_equal nil, headers["Content-Length"]
assert_equal "chunked", headers["Transfer-Encoding"]
assert_equal cache, headers["Cache-Control"]
end
- end if defined?(Fiber)
-end
+ end
+end if defined?(Fiber)