summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-03-14 01:16:52 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-03-14 01:16:52 +0000
commitef77825f10e794fdeb8863b142ff12715f551f29 (patch)
treec6def84a2871fcbcc9985063d595ae56db5af073 /test/unit
parent224331dacb9e376a5e3a779276007d000b8e58ed (diff)
downloadredmine-ef77825f10e794fdeb8863b142ff12715f551f29.tar.gz
redmine-ef77825f10e794fdeb8863b142ff12715f551f29.zip
replace hard-coded non ASCII literal to UTF-8 hexadecimal at test/unit/mail_handler_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9240 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/mail_handler_test.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index bedff3731..9230f4b0f 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -587,8 +587,12 @@ class MailHandlerTest < ActiveSupport::TestCase
user = User.first(:order => 'id DESC')
assert_equal "foo@example.org", user.mail
- assert_equal "Ää", user.firstname
- assert_equal "Öö", user.lastname
+ str1 = "\xc3\x84\xc3\xa4"
+ str2 = "\xc3\x96\xc3\xb6"
+ str1.force_encoding('UTF-8') if str1.respond_to?(:force_encoding)
+ str2.force_encoding('UTF-8') if str2.respond_to?(:force_encoding)
+ assert_equal str1, user.firstname
+ assert_equal str2, user.lastname
end
private