diff options
author | Go MAEDA <maeda@farend.jp> | 2021-03-13 01:16:10 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-03-13 01:16:10 +0000 |
commit | 73648a0b9c39aa69593b72aa629dc3cf2f6fdbf6 (patch) | |
tree | 3d0f76efe97e9188e680fb97cea6250fbe755d01 /test/unit | |
parent | b5635490f29356ae828db63f6e92462adbfd9921 (diff) | |
download | redmine-73648a0b9c39aa69593b72aa629dc3cf2f6fdbf6.tar.gz redmine-73648a0b9c39aa69593b72aa629dc3cf2f6fdbf6.zip |
Add test for 4 byte characters (emoji) support (#32054).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@20780 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/issue_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 4a7c663b5..1fe42a3d8 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -218,6 +218,17 @@ class IssueTest < ActiveSupport::TestCase assert_equal issues.collect(&:id).sort, Issue.all.select {|issue| issue.visible?(user)}.collect(&:id).sort end + def test_create_with_emoji_character + skip if Redmine::Database.mysql? && !is_mysql_utf8mb4 + + set_language_if_valid 'en' + issue = Issue.new(:project_id => 1, :tracker_id => 1, + :author_id => 1, :subject => 'Group assignment', + :description => 'Hello 😀') + assert issue.save + assert_equal 'Hello 😀', issue.description + end + def test_visible_scope_for_anonymous # Anonymous user should see issues of public projects only issues = Issue.visible(User.anonymous).to_a |