From 9281df1bff810a6c3b8c5733e6706622a97c6722 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 1 Sep 2011 23:42:08 +0000 Subject: [PATCH] add test to respond nothing in case of content type is not html with invalid query params (#8883, #6317). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7026 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/issues_controller_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 64aa2bb28..37f60070b 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -317,6 +317,12 @@ class IssuesControllerTest < ActionController::TestCase assert_template 'index' end + def test_index_send_nothing_if_query_is_invalid + get :index, :f => ['start_date'], :op => {:start_date => '='}, :format => 'csv' + assert_equal 'text/csv', @response.content_type + assert @response.body.blank? + end + def test_show_by_anonymous get :show, :id => 1 assert_response :success