aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorScott W. Bradley <scottwb@scottwb.net>2012-02-06 17:46:14 -0800
committerScott W. Bradley <scottwb@scottwb.net>2012-02-06 18:12:43 -0800
commit339c99b62cee7ceab7d799147c36e87053d673f2 (patch)
tree7ce4c3db305c23f92ea4d274df02417016d1bcd8 /actionpack/test/dispatch
parent3e0ecde2082f3b0ca07e7b28cdd4f9294a223442 (diff)
downloadrails-339c99b62cee7ceab7d799147c36e87053d673f2.tar.gz
rails-339c99b62cee7ceab7d799147c36e87053d673f2.tar.bz2
rails-339c99b62cee7ceab7d799147c36e87053d673f2.zip
Failing test case that shows issue #736 should still be open.
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/mime_type_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/mime_type_test.rb b/actionpack/test/dispatch/mime_type_test.rb
index db21080c42..0372c42920 100644
--- a/actionpack/test/dispatch/mime_type_test.rb
+++ b/actionpack/test/dispatch/mime_type_test.rb
@@ -69,6 +69,12 @@ class MimeTypeTest < ActiveSupport::TestCase
assert_equal expect, Mime::Type.parse(accept)
end
+ test "parse single media range with q" do
+ accept = "text/html;q=0.9"
+ expect = [Mime::HTML]
+ assert_equal expect, Mime::Type.parse(accept)
+ end
+
# Accept header send with user HTTP_USER_AGENT: Sunrise/0.42j (Windows XP)
test "parse broken acceptlines" do
accept = "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/*,,*/*;q=0.5"