summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-01-02 02:43:54 +0000
committerGo MAEDA <maeda@farend.jp>2022-01-02 02:43:54 +0000
commit53682d0a2a61b078fd91bdda4634ec7bb2f8f889 (patch)
tree1073c40b23d565bc51af400db96a979366e42867 /test/functional
parent52f0d2a98db655900ec1717b0f10ac667f1c1211 (diff)
downloadredmine-53682d0a2a61b078fd91bdda4634ec7bb2f8f889.tar.gz
redmine-53682d0a2a61b078fd91bdda4634ec7bb2f8f889.zip
Test if the encoding drop-down in the import settings includes all CSV encodings (#36377).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@21338 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/imports_controller_test.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/functional/imports_controller_test.rb b/test/functional/imports_controller_test.rb
index f87fd029f..ceb48c718 100644
--- a/test/functional/imports_controller_test.rb
+++ b/test/functional/imports_controller_test.rb
@@ -34,6 +34,8 @@ class ImportsControllerTest < Redmine::ControllerTest
:custom_fields_projects,
:custom_fields_trackers
+ include Redmine::I18n
+
def setup
User.current = nil
@request.session[:user_id] = 2
@@ -72,7 +74,14 @@ class ImportsControllerTest < Redmine::ControllerTest
assert_response :success
assert_select 'select[name=?]', 'import_settings[separator]'
assert_select 'select[name=?]', 'import_settings[wrapper]'
- assert_select 'select[name=?]', 'import_settings[encoding]'
+ assert_select 'select[name=?]', 'import_settings[encoding]' do
+ encodings = valid_languages.map do |lang|
+ ll(lang.to_s, :general_csv_encoding)
+ end.uniq
+ encodings.each do |encoding|
+ assert_select 'option[value=?]', encoding
+ end
+ end
assert_select 'select[name=?]', 'import_settings[date_format]'
end