diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-11-08 12:12:45 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-11-08 12:12:58 -0800 |
commit | a595abff211eee97d75c51c085cfdc821b1edb46 (patch) | |
tree | e2bf6298f90c3369a8202b60e04bb22c3dbd737a /actionpack/test | |
parent | 103b29831e6d6a6c4363fd0e59ffcc6c343a14aa (diff) | |
download | rails-a595abff211eee97d75c51c085cfdc821b1edb46.tar.gz rails-a595abff211eee97d75c51c085cfdc821b1edb46.tar.bz2 rails-a595abff211eee97d75c51c085cfdc821b1edb46.zip |
Unknown :format param should result in empty request.formats
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 239fda98e0..b62df9a6b2 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -432,6 +432,10 @@ class RequestTest < ActiveSupport::TestCase request = stub_request request.expects(:parameters).at_least_once.returns({ :format => :txt }) assert_equal with_set(Mime::TEXT), request.formats + + request = stub_request + request.expects(:parameters).at_least_once.returns({ :format => :unknown }) + assert request.formats.empty? end test "negotiate_mime" do |