diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-18 12:51:41 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-18 12:51:41 +0000 |
commit | d10ab869a7433c0e7c6f8ddbc56e23ec2098c97c (patch) | |
tree | e0809fb27291ad1a0331baac619518e197232c0d /test/functional/issues_controller_test.rb | |
parent | 3c0c16901c1ae4794f8543ca6f3404a98ff2d82d (diff) | |
download | redmine-d10ab869a7433c0e7c6f8ddbc56e23ec2098c97c.tar.gz redmine-d10ab869a7433c0e7c6f8ddbc56e23ec2098c97c.zip |
Handle csv columns selection in query to preload appropriate associations (#24865).
git-svn-id: http://svn.redmine.org/redmine/trunk@16219 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/issues_controller_test.rb')
-rw-r--r-- | test/functional/issues_controller_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index e01b69f47..2e9a11c42 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -481,7 +481,7 @@ class IssuesControllerTest < Redmine::ControllerTest Issue.generate!(:description => 'test_index_csv_with_description') with_settings :default_language => 'en' do - get :index, :format => 'csv', :csv => {:description => '1'} + get :index, :format => 'csv', :c => [:tracker, :description] assert_response :success end @@ -503,7 +503,7 @@ class IssuesControllerTest < Redmine::ControllerTest end def test_index_csv_with_all_columns - get :index, :format => 'csv', :csv => {:columns => 'all'} + get :index, :format => 'csv', :c => ['all_inline'] assert_response :success assert_equal 'text/csv; header=present', @response.content_type @@ -518,7 +518,7 @@ class IssuesControllerTest < Redmine::ControllerTest issue.custom_field_values = {1 => ['MySQL', 'Oracle']} issue.save! - get :index, :format => 'csv', :csv => {:columns => 'all'} + get :index, :format => 'csv', :c => ['tracker', "cf_1"] assert_response :success lines = @response.body.chomp.split("\n") assert lines.detect {|line| line.include?('"MySQL, Oracle"')} @@ -529,14 +529,14 @@ class IssuesControllerTest < Redmine::ControllerTest issue = Issue.generate!(:project_id => 1, :tracker_id => 1, :custom_field_values => {field.id => '185.6'}) with_settings :default_language => 'fr' do - get :index, :format => 'csv', :csv => {:columns => 'all'} + get :index, :format => 'csv', :c => ['id', 'tracker', "cf_#{field.id}"] assert_response :success issue_line = response.body.chomp.split("\n").map {|line| line.split(';')}.detect {|line| line[0]==issue.id.to_s} assert_include '185,60', issue_line end with_settings :default_language => 'en' do - get :index, :format => 'csv', :csv => {:columns => 'all'} + get :index, :format => 'csv', :c => ['id', 'tracker', "cf_#{field.id}"] assert_response :success issue_line = response.body.chomp.split("\n").map {|line| line.split(',')}.detect {|line| line[0]==issue.id.to_s} assert_include '185.60', issue_line |