Merged r10948 into 2.2-stable (#3447).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.2-stable@10952 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-12-08 08:41:59 +00:00
parent daa77f0109
commit 3a379ce4b9
12 changed files with 124 additions and 24 deletions
+12 -1
View File
@@ -422,7 +422,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal 'text/csv; header=present', @response.content_type
assert @response.body.starts_with?("#,")
lines = @response.body.chomp.split("\n")
assert_equal assigns(:query).available_columns.size + 1, lines[0].split(',').size
assert_equal assigns(:query).available_inline_columns.size + 1, lines[0].split(',').size
end
def test_index_csv_with_multi_column_field
@@ -829,6 +829,17 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal 'application/pdf', response.content_type
end
def test_index_with_description_column
get :index, :set_filter => 1, :c => %w(subject description)
assert_select 'table.issues thead th', 3 # columns: chekbox + id + subject
assert_select 'td.description[colspan=3]', :text => 'Unable to print recipes'
get :index, :set_filter => 1, :c => %w(subject description), :format => 'pdf'
assert_response :success
assert_equal 'application/pdf', response.content_type
end
def test_index_send_html_if_query_is_invalid
get :index, :f => ['start_date'], :op => {:start_date => '='}
assert_equal 'text/html', @response.content_type