From 09cec7824800bdd29c97356c71b51acf47ef6bcc Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 12 Mar 2006 18:50:14 +0000 Subject: Default mime type for XML should be application/xml [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/mime_responds_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb index 159d57f1c3..6fcaaf302d 100644 --- a/actionpack/test/controller/mime_responds_test.rb +++ b/actionpack/test/controller/mime_responds_test.rb @@ -183,4 +183,16 @@ class MimeControllerTest < Test::Unit::TestCase get :custom_type_handling assert_equal 'HTML', @response.body end + + def test_xhtml_alias + @request.env["HTTP_ACCEPT"] = "application/xhtml+xml,application/xml" + get :html_or_xml + assert_equal 'HTML', @response.body + end + + def test_firefox_simulation + @request.env["HTTP_ACCEPT"] = "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" + get :html_or_xml + assert_equal 'HTML', @response.body + end end \ No newline at end of file -- cgit v1.2.3