mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 15:26:03 +01:00
Fixed: Export CSV - Custom field true/false not using translation (#16081).
git-svn-id: http://svn.redmine.org/redmine/trunk@12896 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -36,4 +36,18 @@ class QueriesHelperTest < ActionView::TestCase
|
||||
assert_equal filter_count + 1, fo.size
|
||||
assert_equal [], fo[0]
|
||||
end
|
||||
|
||||
def test_query_to_csv_should_translate_boolean_custom_field_values
|
||||
f = IssueCustomField.generate!(:field_format => 'bool', :name => 'Boolean', :is_for_all => true, :trackers => Tracker.all)
|
||||
issues = [
|
||||
Issue.generate!(:project_id => 1, :tracker_id => 1, :custom_field_values => {f.id.to_s => '0'}),
|
||||
Issue.generate!(:project_id => 1, :tracker_id => 1, :custom_field_values => {f.id.to_s => '1'})
|
||||
]
|
||||
|
||||
with_locale 'fr' do
|
||||
csv = query_to_csv(issues, IssueQuery.new, :columns => 'all')
|
||||
assert_include "Oui", csv
|
||||
assert_include "Non", csv
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user