aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/layout_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-03-05 11:27:14 -0800
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-01-17 09:25:12 -0200
commita5013bb5af299db6bf97f67d4198220280717e80 (patch)
tree4c97d6cbf2f285fe5b0be56dd318d9fda32b1707 /actionpack/test/controller/layout_test.rb
parentd3dcb4b9b26c1ea8b44ee8660af10683cd41e35f (diff)
downloadrails-a5013bb5af299db6bf97f67d4198220280717e80.tar.gz
rails-a5013bb5af299db6bf97f67d4198220280717e80.tar.bz2
rails-a5013bb5af299db6bf97f67d4198220280717e80.zip
Merge pull request #5288 from lest/patch-2
force response body to be read in assert_template Conflicts: actionpack/lib/action_controller/test_case.rb
Diffstat (limited to 'actionpack/test/controller/layout_test.rb')
-rw-r--r--actionpack/test/controller/layout_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb
index bc171e201b..38c4baceb0 100644
--- a/actionpack/test/controller/layout_test.rb
+++ b/actionpack/test/controller/layout_test.rb
@@ -78,6 +78,13 @@ end
class DefaultLayoutController < LayoutTest
end
+class StreamingLayoutController < LayoutTest
+ def render(*args)
+ options = args.extract_options!
+ super(*args, options.merge(:stream => true))
+ end
+end
+
class AbsolutePathLayoutController < LayoutTest
layout File.expand_path(File.expand_path(__FILE__) + '/../../fixtures/layout_tests/layouts/layout_test')
end
@@ -122,6 +129,12 @@ class LayoutSetInResponseTest < ActionController::TestCase
assert_template :layout => "layouts/layout_test"
end
+ def test_layout_set_when_using_streaming_layout
+ @controller = StreamingLayoutController.new
+ get :hello
+ assert_template :hello
+ end
+
def test_layout_set_when_set_in_controller
@controller = HasOwnLayoutController.new
get :hello