aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-02-15 16:40:38 +0000
committerRick Olson <technoweenie@gmail.com>2007-02-15 16:40:38 +0000
commite312cc32152933d280ac8dac72d66485d28b24ba (patch)
tree6147f8f7ff5ca3d2f4dea9d60fbcd3341037adc3 /actionpack
parent5d54b8f07cef29e932e164e23713a71274c78e49 (diff)
downloadrails-e312cc32152933d280ac8dac72d66485d28b24ba.tar.gz
rails-e312cc32152933d280ac8dac72d66485d28b24ba.tar.bz2
rails-e312cc32152933d280ac8dac72d66485d28b24ba.zip
remove Mime::PLAIN from tests so its not confused with the default Mime::TEXT mime type
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6153 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/mime_type_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/test/controller/mime_type_test.rb b/actionpack/test/controller/mime_type_test.rb
index 0755f9d62d..0425b034c5 100644
--- a/actionpack/test/controller/mime_type_test.rb
+++ b/actionpack/test/controller/mime_type_test.rb
@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../abstract_unit'
class MimeTypeTest < Test::Unit::TestCase
Mime::Type.register "image/png", :png
- Mime::Type.register "text/plain", :plain
+ Mime::Type.register "application/pdf", :pdf
def test_parse_single
Mime::LOOKUP.keys.each do |mime_type|
@@ -11,14 +11,14 @@ class MimeTypeTest < Test::Unit::TestCase
end
def test_parse_without_q
- accept = "text/xml,application/xhtml+xml,text/yaml,application/xml,text/html,image/png,text/plain,*/*"
- expect = [Mime::HTML, Mime::XML, Mime::YAML, Mime::PNG, Mime::PLAIN, Mime::ALL]
+ accept = "text/xml,application/xhtml+xml,text/yaml,application/xml,text/html,image/png,text/plain,application/pdf,*/*"
+ expect = [Mime::HTML, Mime::XML, Mime::YAML, Mime::PNG, Mime::TEXT, Mime::PDF, Mime::ALL]
assert_equal expect, Mime::Type.parse(accept)
end
def test_parse_with_q
- accept = "text/xml,application/xhtml+xml,text/yaml; q=0.3,application/xml,text/html; q=0.8,image/png,text/plain; q=0.5,*/*; q=0.2"
- expect = [Mime::HTML, Mime::XML, Mime::PNG, Mime::PLAIN, Mime::YAML, Mime::ALL]
+ accept = "text/xml,application/xhtml+xml,text/yaml; q=0.3,application/xml,text/html; q=0.8,image/png,text/plain; q=0.5,application/pdf,*/*; q=0.2"
+ expect = [Mime::HTML, Mime::XML, Mime::PNG, Mime::PDF, Mime::TEXT, Mime::YAML, Mime::ALL]
assert_equal expect, Mime::Type.parse(accept)
end
@@ -32,7 +32,7 @@ class MimeTypeTest < Test::Unit::TestCase
end
def test_type_convenience_methods
- types = [:html, :xml, :png, :plain, :yaml]
+ types = [:html, :xml, :png, :pdf, :yaml]
types.each do |type|
mime = Mime.const_get(type.to_s.upcase)
assert mime.send("#{type}?"), "Mime::#{type.to_s.upcase} is not #{type}?"