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
This commit is contained in:
Toshi MARUYAMA 2012-03-14 01:16:52 +00:00
parent 224331dacb
commit ef77825f10
1 changed files with 6 additions and 2 deletions

View File

@ -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