]> source.dussan.org Git - redmine.git/commitdiff
Test if the encoding drop-down in the import settings includes all CSV encodings...
authorGo MAEDA <maeda@farend.jp>
Sun, 2 Jan 2022 02:43:54 +0000 (02:43 +0000)
committerGo MAEDA <maeda@farend.jp>
Sun, 2 Jan 2022 02:43:54 +0000 (02:43 +0000)
Patch by Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@21338 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/imports_controller_test.rb

index f87fd029f525a09670824f4177e49362f1876180..ceb48c7181847a64ea5898e7c9bab5df3f6dd0e5 100644 (file)
@@ -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