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
This commit is contained in:
Toshi MARUYAMA 2011-09-01 23:42:08 +00:00
parent 4645cf0ac8
commit 9281df1bff
1 changed files with 6 additions and 0 deletions

View File

@ -317,6 +317,12 @@ class IssuesControllerTest < ActionController::TestCase
assert_template 'index' assert_template 'index'
end 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 def test_show_by_anonymous
get :show, :id => 1 get :show, :id => 1
assert_response :success assert_response :success