mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
parent
10e0e5125b
commit
7f10232b9e
1 changed files with 3 additions and 3 deletions
|
@ -31,21 +31,21 @@ class MimeTypeTest < ActiveSupport::TestCase
|
||||||
|
|
||||||
test "parse text with trailing star at the beginning" do
|
test "parse text with trailing star at the beginning" do
|
||||||
accept = "text/*, text/html, application/json, multipart/form-data"
|
accept = "text/*, text/html, application/json, multipart/form-data"
|
||||||
expect = [Mime::HTML, Mime::TEXT, Mime::JS, Mime::CSS, Mime::ICS, Mime::CSV, Mime::XML, Mime::YAML, Mime::JSON, Mime::MULTIPART_FORM]
|
expect = [Mime::HTML, Mime::TEXT, Mime::JS, Mime::CSS, Mime::ICS, Mime::CSV, Mime::VCF, Mime::XML, Mime::YAML, Mime::JSON, Mime::MULTIPART_FORM]
|
||||||
parsed = Mime::Type.parse(accept)
|
parsed = Mime::Type.parse(accept)
|
||||||
assert_equal expect, parsed
|
assert_equal expect, parsed
|
||||||
end
|
end
|
||||||
|
|
||||||
test "parse text with trailing star in the end" do
|
test "parse text with trailing star in the end" do
|
||||||
accept = "text/html, application/json, multipart/form-data, text/*"
|
accept = "text/html, application/json, multipart/form-data, text/*"
|
||||||
expect = [Mime::HTML, Mime::JSON, Mime::MULTIPART_FORM, Mime::TEXT, Mime::JS, Mime::CSS, Mime::ICS, Mime::CSV, Mime::XML, Mime::YAML]
|
expect = [Mime::HTML, Mime::JSON, Mime::MULTIPART_FORM, Mime::TEXT, Mime::JS, Mime::CSS, Mime::ICS, Mime::CSV, Mime::VCF, Mime::XML, Mime::YAML]
|
||||||
parsed = Mime::Type.parse(accept)
|
parsed = Mime::Type.parse(accept)
|
||||||
assert_equal expect, parsed
|
assert_equal expect, parsed
|
||||||
end
|
end
|
||||||
|
|
||||||
test "parse text with trailing star" do
|
test "parse text with trailing star" do
|
||||||
accept = "text/*"
|
accept = "text/*"
|
||||||
expect = [Mime::HTML, Mime::TEXT, Mime::JS, Mime::CSS, Mime::ICS, Mime::CSV, Mime::XML, Mime::YAML, Mime::JSON]
|
expect = [Mime::HTML, Mime::TEXT, Mime::JS, Mime::CSS, Mime::ICS, Mime::CSV, Mime::VCF, Mime::XML, Mime::YAML, Mime::JSON]
|
||||||
parsed = Mime::Type.parse(accept)
|
parsed = Mime::Type.parse(accept)
|
||||||
assert_equal expect, parsed
|
assert_equal expect, parsed
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue