diff options
Diffstat (limited to 'actionpack/test/controller/mime_responds_test.rb')
-rw-r--r-- | actionpack/test/controller/mime_responds_test.rb | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb index 56b49251c6..93ca34c41c 100644 --- a/actionpack/test/controller/mime_responds_test.rb +++ b/actionpack/test/controller/mime_responds_test.rb @@ -375,11 +375,9 @@ class MimeControllerTest < ActionController::TestCase end def test_rjs_type_skips_layout - pending(:new_base) do - @request.accept = "text/javascript" - get :all_types_with_layout - assert_equal 'RJS for all_types_with_layout', @response.body - end + @request.accept = "text/javascript" + get :all_types_with_layout + assert_equal 'RJS for all_types_with_layout', @response.body end def test_html_type_with_layout @@ -467,14 +465,6 @@ class MimeControllerTest < ActionController::TestCase assert_equal '<html><div id="iphone">Hello iPhone future from iPhone!</div></html>', @response.body assert_equal "text/html", @response.content_type end - - def test_format_with_custom_response_type_and_request_headers_with_only_one_layout_present - get :iphone_with_html_response_type_without_layout - assert_equal '<html><div id="html_missing">Hello future from Firefox!</div></html>', @response.body - - @request.accept = "text/iphone" - assert_raise(ActionView::MissingTemplate) { get :iphone_with_html_response_type_without_layout } - end end class AbstractPostController < ActionController::Base @@ -512,11 +502,6 @@ class SuperPostController < PostController end end -if defined?(ActionController::Http) - PostController._write_layout_method - SuperPostController._write_layout_method -end - class MimeControllerLayoutsTest < ActionController::TestCase tests PostController @@ -534,16 +519,14 @@ class MimeControllerLayoutsTest < ActionController::TestCase assert_equal 'Hello iPhone', @response.body end - for_tag(:old_base) do - def test_format_with_inherited_layouts - @controller = SuperPostController.new + def test_format_with_inherited_layouts + @controller = SuperPostController.new - get :index - assert_equal 'Super Firefox', @response.body + get :index + assert_equal '<html><div id="html">Super Firefox</div></html>', @response.body - @request.accept = "text/iphone" - get :index - assert_equal '<html><div id="super_iphone">Super iPhone</div></html>', @response.body - end + @request.accept = "text/iphone" + get :index + assert_equal '<html><div id="super_iphone">Super iPhone</div></html>', @response.body end end |