Ticket #8737: layout_broken_with_only.diff
| File layout_broken_with_only.diff, 1.1 kB (added by lifofifo, 2 years ago) |
|---|
-
actionpack/test/controller/layout_test.rb
old new 135 135 class DefaultLayoutController < LayoutTest 136 136 end 137 137 138 class UsesMultipleLayoutController < LayoutTest 139 layout 'item', :only => :hello 140 def world 141 render :template => 'hello' 142 end 143 end 144 138 145 class HasOwnLayoutController < LayoutTest 139 146 layout 'item' 140 147 end … … 163 170 assert_equal 'layouts/layout_test', @response.layout 164 171 end 165 172 173 def test_layout_set_when_set_with_only 174 @controller = UsesMultipleLayoutController.new 175 get :hello 176 assert_equal 'layouts/item', @response.layout 177 end 178 179 def test_parent_layout_set_when_only_conditional_layout_used 180 @controller = UsesMultipleLayoutController.new 181 get :world 182 assert_equal 'layouts/layout_test', @response.layout 183 end 184 166 185 def test_layout_set_when_set_in_controller 167 186 @controller = HasOwnLayoutController.new 168 187 get :hello