Adds an option for displaying the issue description on the issue list (#3447).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10948 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-12-06 17:48:19 +00:00
parent 43fb321195
commit 8201761e77
12 changed files with 124 additions and 24 deletions

View File

@@ -418,7 +418,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
@@ -825,6 +825,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