##// END OF EJS Templates
Fixed CSV content for parent issue column (#13608)....
Jean-Philippe Lang -
r13173:db63f5a925f4
parent child
Show More
@@ -128,6 +128,8 module QueriesHelper
128 when 'IssueRelation'
128 when 'IssueRelation'
129 other = value.other_issue(issue)
129 other = value.other_issue(issue)
130 l(value.label_for(issue)) + " ##{other.id}"
130 l(value.label_for(issue)) + " ##{other.id}"
131 when 'Issue'
132 value.id
131 else
133 else
132 value
134 value
133 end
135 end
@@ -472,6 +472,18 class IssuesControllerTest < ActionController::TestCase
472 end
472 end
473 end
473 end
474
474
475 def test_index_csv_should_fill_parent_column_with_parent_id
476 Issue.delete_all
477 parent = Issue.generate!
478 child = Issue.generate!(:parent_issue_id => parent.id)
479
480 with_settings :default_language => 'en' do
481 get :index, :format => 'csv', :c => %w(parent)
482 end
483 lines = response.body.split
484 assert_include "#{child.id},#{parent.id}", lines
485 end
486
475 def test_index_csv_big_5
487 def test_index_csv_big_5
476 with_settings :default_language => "zh-TW" do
488 with_settings :default_language => "zh-TW" do
477 str_utf8 = "\xe4\xb8\x80\xe6\x9c\x88".force_encoding('UTF-8')
489 str_utf8 = "\xe4\xb8\x80\xe6\x9c\x88".force_encoding('UTF-8')
General Comments 0
You need to be logged in to leave comments. Login now