summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-02-23 11:07:43 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-02-23 11:07:43 +0000
commit797a9f1ea945c891b5974881d0b3d6b5c4f56125 (patch)
treef0ed773e17d6b1d5a0619ab7f5ac06078e30f9a7 /test/functional
parent9b1ebd6808d260a95eff38c2a93ec2c1b7ed8183 (diff)
downloadredmine-797a9f1ea945c891b5974881d0b3d6b5c4f56125.tar.gz
redmine-797a9f1ea945c891b5974881d0b3d6b5c4f56125.zip
Refactor: #issues_to_csv and #entries_to_csv merged into QueriesHelper#query_to_csv.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11448 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/issues_controller_test.rb19
1 files changed, 12 insertions, 7 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index df3c2e330..a9cf46140 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -391,13 +391,18 @@ class IssuesControllerTest < ActionController::TestCase
end
def test_index_csv_with_description
- get :index, :format => 'csv', :description => '1'
- assert_response :success
- assert_not_nil assigns(:issues)
- assert_equal 'text/csv; header=present', @response.content_type
- assert @response.body.starts_with?("#,")
- lines = @response.body.chomp.split("\n")
- assert_equal assigns(:query).columns.size + 1, lines[0].split(',').size
+ Issue.generate!(:description => 'test_index_csv_with_description')
+
+ with_settings :default_language => 'en' do
+ get :index, :format => 'csv', :description => '1'
+ assert_response :success
+ assert_not_nil assigns(:issues)
+ end
+
+ assert_equal 'text/csv; header=present', response.content_type
+ headers = response.body.chomp.split("\n").first.split(',')
+ assert_include 'Description', headers
+ assert_include 'test_index_csv_with_description', response.body
end
def test_index_csv_with_spent_time_column