summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-01-04 07:04:00 +0000
committerGo MAEDA <maeda@farend.jp>2024-01-04 07:04:00 +0000
commit0be401391901f0d6e1808c706f76d9c2cca3c0cf (patch)
tree433bf2c97cce662e4e007af9f204313c0523eaaa /test/unit
parentf7d2f9f00b27bc4117ed7dc2aeb1fad4c819a226 (diff)
downloadredmine-0be401391901f0d6e1808c706f76d9c2cca3c0cf.tar.gz
redmine-0be401391901f0d6e1808c706f76d9c2cca3c0cf.zip
Support localized decimal separators for float values in PDF export (#22024).
Patch by Go MAEDA (@maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@22594 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/lib/redmine/export/pdf/issues_pdf_test.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/unit/lib/redmine/export/pdf/issues_pdf_test.rb b/test/unit/lib/redmine/export/pdf/issues_pdf_test.rb
index 4dd40b9fc..e150aca84 100644
--- a/test/unit/lib/redmine/export/pdf/issues_pdf_test.rb
+++ b/test/unit/lib/redmine/export/pdf/issues_pdf_test.rb
@@ -33,8 +33,13 @@ class IssuesPdfHelperTest < ActiveSupport::TestCase
time_entry = TimeEntry.create!(:spent_on => Date.today, :hours => 4.3432, :user => user, :author => user,
:project_id => 1, :issue => issue, :activity => TimeEntryActivity.first)
- results = fetch_row_values(issue, query, 0)
- assert_equal ["2", "Add ingredients categories", "4.34"], results
+ to_test = {'en' => '4.34', 'de' => '4,34'}
+ to_test.each do |locale, expected|
+ with_locale locale do
+ results = fetch_row_values(issue, query, 0)
+ assert_equal ['2', 'Add ingredients categories', expected], results
+ end
+ end
end
def test_fetch_row_values_should_be_able_to_handle_parent_issue_subject