From 06c2b43f36c84ddd3e17ada057b3dc621d4140f0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 13 Mar 2006 01:33:57 +0000 Subject: Rendering xml shouldnt happen inside any layout. Added class proxying to RJS, so you can call page.field.clear("my_field") to generate Field.clear("my_field");. Added :content_type option to render, so you can change the content type on the fly. Do type/subtype reordering of Accept header preferences for xml types (aka make Firefox work with respond_to). CHANGED DEFAULT: The default content type for .rxml is now application/xml instead of type/xml, see http://www.xml.com/pub/a/2004/07/21/dive.html for reason git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3852 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/action_pack_assertions_test.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack/test/controller/action_pack_assertions_test.rb') diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 9ab0f28f6b..b359750d16 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -479,10 +479,12 @@ class ActionPackHeaderTest < Test::Unit::TestCase @controller = ActionPackAssertionsController.new @request, @response = ActionController::TestRequest.new, ActionController::TestResponse.new end + def test_rendering_xml_sets_content_type process :hello_xml_world - assert_equal('text/xml', @controller.headers['Content-Type']) + assert_equal('application/xml', @controller.headers['Content-Type']) end + def test_rendering_xml_respects_content_type @response.headers['Content-Type'] = 'application/pdf' process :hello_xml_world -- cgit v1.2.3