diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-10-10 13:17:06 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-10-10 13:17:06 +0100 |
commit | 247a24cde3954b7f7b3cbb2e3b624669b6e6e61d (patch) | |
tree | 96e16b35ec7223b1c2eaea0ea1ee3afc5aa583b4 /spec/lib/tmail_extensions_spec.rb | |
parent | efab570be9d10f1f75096023a3963f83ad4c6c1f (diff) |
Extra tests to sanity check UTF conversion (see issue #128 for background)
Diffstat (limited to 'spec/lib/tmail_extensions_spec.rb')
-rw-r--r-- | spec/lib/tmail_extensions_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/tmail_extensions_spec.rb b/spec/lib/tmail_extensions_spec.rb index c647fe522..ffb8cb178 100644 --- a/spec/lib/tmail_extensions_spec.rb +++ b/spec/lib/tmail_extensions_spec.rb @@ -27,5 +27,14 @@ describe "when using TMail" do mail.to.should == ["request-66666-caa77777@whatdotheyknow.com", "foi@example.com"] end + it 'should convert to utf8' do + # NB this isn't actually a TMail extension, but is core TMail; + # this was just a convenient place to assert the UTF8 + # conversion is working + mail = TMail::Mail.parse(load_file_fixture('iso8859_2_raw_email.email')) + mail.subject.should have_text(/gjatë/u) + mail.body.is_utf8?.should == true + end + end |