diff options
author | Seth Fitzsimmons <seth@mojodna.net> | 2008-12-15 12:00:55 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-12-15 12:00:55 -0600 |
commit | f36dafa492e3de66e624d81d6860f5f0536de6b0 (patch) | |
tree | 17fcb6dbb50c52f5f06ceaab00cf203be17c3dac /actionpack/test/controller | |
parent | 7c18518105e98ccfd89fe64194ede27824dfe8b3 (diff) | |
download | rails-f36dafa492e3de66e624d81d6860f5f0536de6b0.tar.gz rails-f36dafa492e3de66e624d81d6860f5f0536de6b0.tar.bz2 rails-f36dafa492e3de66e624d81d6860f5f0536de6b0.zip |
Implement Mime::Type.=~ to match all synonyms against arg [#1573 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/mime_type_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/controller/mime_type_test.rb b/actionpack/test/controller/mime_type_test.rb index 21ae0419f1..9c4416ecf0 100644 --- a/actionpack/test/controller/mime_type_test.rb +++ b/actionpack/test/controller/mime_type_test.rb @@ -81,4 +81,12 @@ class MimeTypeTest < Test::Unit::TestCase assert verified.each { |type| assert Mime.const_get(type.to_s.upcase).verify_request?, "Verifiable Mime Type is not verified: #{type.inspect}" } assert unverified.each { |type| assert !Mime.const_get(type.to_s.upcase).verify_request?, "Nonverifiable Mime Type is verified: #{type.inspect}" } end + + def test_regexp_matcher + assert Mime::JS =~ "text/javascript" + assert Mime::JS =~ "application/javascript" + assert Mime::JS !~ "text/html" + assert !(Mime::JS !~ "text/javascript") + assert !(Mime::JS !~ "application/javascript") + end end |