diff options
| author | Joshua Peek <josh@joshpeek.com> | 2011-05-20 11:24:32 -0500 |
|---|---|---|
| committer | Joshua Peek <josh@joshpeek.com> | 2011-05-20 11:24:32 -0500 |
| commit | 0651355e71a41a9f74814873f93374a02df2276c (patch) | |
| tree | 2c4ad2fc8e656d8449bed78d627684c9edc26db0 /test/test_pathname.rb | |
| parent | 0f0f6d282b1b8d4f21079389d0245cdf0b39ebc7 (diff) | |
Split mime type and content type
Diffstat (limited to 'test/test_pathname.rb')
| -rw-r--r-- | test/test_pathname.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/test/test_pathname.rb b/test/test_pathname.rb index 95cfd5c..ae1281f 100644 --- a/test/test_pathname.rb +++ b/test/test_pathname.rb @@ -61,10 +61,16 @@ class TestPathname < Test::Unit::TestCase end def test_mime_type - assert_equal 'text/plain; charset=utf-8', Pathname.new("file.rb").mime_type - assert_equal 'text/plain; charset=utf-8', Pathname.new("file.js").mime_type - assert_equal 'text/plain; charset=utf-8', Pathname.new("itty.py").mime_type - assert_equal 'text/plain; charset=utf-8', Pathname.new("defun.kt").mime_type + assert_equal 'text/plain', Pathname.new("file.rb").mime_type + assert_equal 'text/plain', Pathname.new("file.js").mime_type + assert_equal 'text/plain', Pathname.new("itty.py").mime_type + assert_equal 'text/plain', Pathname.new("defun.kt").mime_type + end + + def test_content_type + assert_equal 'text/plain; charset=utf-8', Pathname.new("file.txt").content_type + assert_equal 'text/plain; charset=utf-8', Pathname.new("file.rb").content_type + assert_equal 'image/png', Pathname.new("octocat.png").content_type end def test_media_type |
