From a595abff211eee97d75c51c085cfdc821b1edb46 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 8 Nov 2009 12:12:45 -0800 Subject: Unknown :format param should result in empty request.formats --- actionpack/test/dispatch/request_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/test/dispatch/request_test.rb') 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 -- cgit v1.2.3