diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-08-14 15:52:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-08-14 15:52:04 +0000 |
commit | 67ea285dea5185fa11b351a3fa8507c6fb92e030 (patch) | |
tree | 9f7c041b4fee22c4e5ad9c8d9e1a399bdfcb5c2a /test/unit/issue_import_test.rb | |
parent | 722eaed7216270d8e89f50c92abb1cfaf9bf1503 (diff) | |
download | redmine-67ea285dea5185fa11b351a3fa8507c6fb92e030.tar.gz redmine-67ea285dea5185fa11b351a3fa8507c6fb92e030.zip |
Set default date format based on user locale (#950).
git-svn-id: http://svn.redmine.org/redmine/trunk@14496 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_import_test.rb')
-rw-r--r-- | test/unit/issue_import_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/issue_import_test.rb b/test/unit/issue_import_test.rb index aee1af441..7d0a7b9e1 100644 --- a/test/unit/issue_import_test.rb +++ b/test/unit/issue_import_test.rb @@ -92,6 +92,16 @@ class IssueImportTest < ActiveSupport::TestCase assert_equal '2015-07-14', issue.custom_field_value(field) end + def test_date_format_should_default_to_user_language + user = User.generate!(:language => 'fr') + import = Import.new + import.user = user + assert_nil import.settings['date_format'] + + import.set_default_settings + assert_equal '%d/%m/%Y', import.settings['date_format'] + end + def test_run_should_remove_the_file import = generate_import_with_mapping file_path = import.filepath |