Ticket #8867: test_multiple_layout_with_only_and_except_conditions.diff
| File test_multiple_layout_with_only_and_except_conditions.diff, 0.8 kB (added by mikong, 1 year ago) |
|---|
-
test/controller/layout_test.rb
old new 151 151 end 152 152 end 153 153 154 class MultipleLayoutController < LayoutTest 155 layout 'layout_test', :only => [:hello] 156 layout 'item', :except => [:hello] 157 158 def hello 159 end 160 end 161 154 162 class LayoutSetInResponseTest < Test::Unit::TestCase 155 163 def setup 156 164 @request = ActionController::TestRequest.new … … 180 188 get :hello 181 189 assert_nil @response.layout 182 190 end 191 192 def test_layout_with_except_condition_and_parent_with_only_condition 193 @controller = MultipleLayoutController.new 194 get :hello 195 assert_not_equal 'layouts/item', @response.layout 196 end 183 197 end 184 198 185 199