aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-03-12 18:50:14 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-03-12 18:50:14 +0000
commit09cec7824800bdd29c97356c71b51acf47ef6bcc (patch)
tree40fc15739537e9114f592ef7f7bed8e44071c43d /actionpack/test
parente3ea34f7d30b9866da8f34be4108f8449218f9fd (diff)
downloadrails-09cec7824800bdd29c97356c71b51acf47ef6bcc.tar.gz
rails-09cec7824800bdd29c97356c71b51acf47ef6bcc.tar.bz2
rails-09cec7824800bdd29c97356c71b51acf47ef6bcc.zip
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
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/mime_responds_test.rb12
1 files changed, 12 insertions, 0 deletions
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