diff options
author | José Valim <jose.valim@gmail.com> | 2010-11-28 22:40:32 +0100 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-08 14:14:26 -0800 |
commit | 6b1018526fb304727ee4191afc2d8a5e29e49eea (patch) | |
tree | 33e57e76341028a8bd42bf8cac33b038fbd3dcf2 /actionpack/test/controller/new_base | |
parent | b93c590297ba65a6c5b18655a7790163abcb06f1 (diff) | |
download | rails-6b1018526fb304727ee4191afc2d8a5e29e49eea.tar.gz rails-6b1018526fb304727ee4191afc2d8a5e29e49eea.tar.bz2 rails-6b1018526fb304727ee4191afc2d8a5e29e49eea.zip |
Use Mime::Type references.
Diffstat (limited to 'actionpack/test/controller/new_base')
-rw-r--r-- | actionpack/test/controller/new_base/content_negotiation_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/new_base/content_negotiation_test.rb b/actionpack/test/controller/new_base/content_negotiation_test.rb index b98a22dfcc..5fd5946619 100644 --- a/actionpack/test/controller/new_base/content_negotiation_test.rb +++ b/actionpack/test/controller/new_base/content_negotiation_test.rb @@ -7,6 +7,10 @@ module ContentNegotiation self.view_paths = [ActionView::FixtureResolver.new( "content_negotiation/basic/hello.html.erb" => "Hello world <%= request.formats.first.to_s %>!" )] + + def all + render :text => self.formats.inspect + end end class TestContentNegotiation < Rack::TestCase @@ -14,5 +18,10 @@ module ContentNegotiation get "/content_negotiation/basic/hello", {}, "HTTP_ACCEPT" => "*/*" assert_body "Hello world */*!" end + + test "Not all mimes are converted to symbol" do + get "/content_negotiation/basic/all", {}, "HTTP_ACCEPT" => "text/plain, mime/another" + assert_body '[:text, "mime/another"]' + end end end |