From dd58f4021da30af7f40ee139e7487b887cac44e9 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Tue, 16 Jun 2009 13:44:51 -0700 Subject: An exception is raised if a layout is missing only if the layout is missing for all mimes --- actionpack/test/controller/mime_responds_test.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'actionpack/test/controller/mime_responds_test.rb') diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb index 0c6822a5b1..04d6c4173a 100644 --- a/actionpack/test/controller/mime_responds_test.rb +++ b/actionpack/test/controller/mime_responds_test.rb @@ -467,14 +467,6 @@ class MimeControllerTest < ActionController::TestCase assert_equal '
Hello iPhone future from iPhone!
', @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 '
Hello future from Firefox!
', @response.body - - @request.accept = "text/iphone" - assert_raise(ActionView::MissingTemplate) { get :iphone_with_html_response_type_without_layout } - end end class AbstractPostController < ActionController::Base -- cgit v1.2.3 From 487312515c09c5dbc7306329805f2eebfed1d630 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Wed, 17 Jun 2009 12:36:15 -0700 Subject: RJS doesn't render with an HTML layout by default --- actionpack/test/controller/mime_responds_test.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'actionpack/test/controller/mime_responds_test.rb') diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb index 04d6c4173a..c9994ee013 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 -- cgit v1.2.3 From 65102c8f1a55c8d73e44b62eed5e689017ace7cd Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Wed, 17 Jun 2009 16:51:51 -0700 Subject: Cleaning up more tests and code that needed to work in both old and new base --- actionpack/test/controller/mime_responds_test.rb | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'actionpack/test/controller/mime_responds_test.rb') diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb index c9994ee013..93ca34c41c 100644 --- a/actionpack/test/controller/mime_responds_test.rb +++ b/actionpack/test/controller/mime_responds_test.rb @@ -519,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 '
Super Firefox
', @response.body - @request.accept = "text/iphone" - get :index - assert_equal '
Super iPhone
', @response.body - end + @request.accept = "text/iphone" + get :index + assert_equal '
Super iPhone
', @response.body end end -- cgit v1.2.3