diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-04-08 19:14:59 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-04-08 19:14:59 -0300 |
commit | a9d58c77da800bb0052c9bfa432828b02526022c (patch) | |
tree | 21b9b34f6274f6819aeab66cf61777db2d7b9487 /actionview/test | |
parent | 041c2c879a3c4086ad3aa6d30fed1eede1d53c11 (diff) | |
parent | c51aa9f6f2c361e1efc53020028592564318e8a6 (diff) | |
download | rails-a9d58c77da800bb0052c9bfa432828b02526022c.tar.gz rails-a9d58c77da800bb0052c9bfa432828b02526022c.tar.bz2 rails-a9d58c77da800bb0052c9bfa432828b02526022c.zip |
Merge pull request #19685 from vngrs/actionview_parent_layout_bug
fix for actionview parent layout bug
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/actionpack/controller/layout_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/actionview/test/actionpack/controller/layout_test.rb b/actionview/test/actionpack/controller/layout_test.rb index 7b8a83e2fe..64ab125637 100644 --- a/actionview/test/actionpack/controller/layout_test.rb +++ b/actionview/test/actionpack/controller/layout_test.rb @@ -122,6 +122,14 @@ class PrependsViewPathController < LayoutTest end end +class ParentController < LayoutTest + layout 'item' +end + +class ChildController < ParentController + layout 'layout_test', only: :hello +end + class OnlyLayoutController < LayoutTest layout 'item', :only => "hello" end @@ -225,6 +233,12 @@ class LayoutSetInResponseTest < ActionController::TestCase get :hello assert_equal "layout_test.erb hello.erb", @response.body.strip end + + def test_respect_to_parent_layout + @controller = ChildController.new + get :goodbye + assert_template :layout => "layouts/item" + end end class SetsNonExistentLayoutFile < LayoutTest |