1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fixed test for Mime::VCF

Added here 13dd38cee7
This commit is contained in:
Arun Agrawal 2013-12-06 08:14:36 +01:00
parent 10e0e5125b
commit 7f10232b9e

View file

@ -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