Class: TC_Unquoter

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
lib/action_mailer/vendor/tmail/quoting.rb

Instance Method Summary collapse

Instance Method Details

#test_unquote_base64Object



112
113
114
115
116
# File 'lib/action_mailer/vendor/tmail/quoting.rb', line 112

def test_unquote_base64
  a ="=?ISO-8859-1?B?WzE2NjQxN10gQmVrcuZmdGVsc2UgZnJhIFJlanNlZmViZXI=?="
  b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8')
  assert_equal "[166417] Bekr\303\246ftelse fra Rejsefeber", b
end

#test_unquote_quoted_printableObject



106
107
108
109
110
# File 'lib/action_mailer/vendor/tmail/quoting.rb', line 106

def test_unquote_quoted_printable
  a ="=?ISO-8859-1?Q?[166417]_Bekr=E6ftelse_fra_Rejsefeber?=" 
  b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8')
  assert_equal "[166417] Bekr\303\246ftelse fra Rejsefeber", b
end

#test_unquote_without_charsetObject



118
119
120
121
122
# File 'lib/action_mailer/vendor/tmail/quoting.rb', line 118

def test_unquote_without_charset
  a ="[166417]_Bekr=E6ftelse_fra_Rejsefeber" 
  b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8')
  assert_equal "[166417]_Bekr=E6ftelse_fra_Rejsefeber", b
end