diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-04-14 08:20:52 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-04-14 08:20:52 +0000 |
commit | f6f136871a1361b28ad7d829a6915f642bd627c0 (patch) | |
tree | bfb86ead3eb70c3b9b427fd68962ca31b9a0adc5 /test/test_helper.rb | |
parent | 6cdd161ba12e860cce0ab4ae643067f7b16a094e (diff) | |
download | redmine-f6f136871a1361b28ad7d829a6915f642bd627c0.tar.gz redmine-f6f136871a1361b28ad7d829a6915f642bd627c0.zip |
scm: git: add test of UTF-8 Emoji committer and comments (#24030)
git-svn-id: http://svn.redmine.org/redmine/trunk@19699 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index aeea0e216..07464b2ff 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -163,6 +163,21 @@ class ActiveSupport::TestCase File.directory?(repository_path(vendor)) end + def self.is_mysql_utf8mb4 + return false unless Redmine::Database::mysql? + character_sets = %w[ + character_set_connection + character_set_database + character_set_results + character_set_server + ] + ActiveRecord::Base.connection. + select_rows('show variables like "character%"').each do |r| + return false if character_sets.include?(r[0]) && r[1] != "utf8mb4" + end + return true + end + def repository_path_hash(arr) hs = {} hs[:path] = arr.join("/") |