aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib/mail_handler
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-11-15 14:04:55 +0000
committerLouise Crow <louise.crow@gmail.com>2012-11-15 14:05:33 +0000
commit4bdab94e9d4f0a64647e5f8534c1fea8b4ba2809 (patch)
tree6071f4273cb98cedf1bfd54b7a415ac1717fce00 /spec/lib/mail_handler
parent8834f67db8cd94a0285dd1bb4702db834e08e995 (diff)
Move TMail extensions to mail handler.
Diffstat (limited to 'spec/lib/mail_handler')
-rw-r--r--spec/lib/mail_handler/mail_handler_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/mail_handler/mail_handler_spec.rb b/spec/lib/mail_handler/mail_handler_spec.rb
index fc29817f6..a3fba0698 100644
--- a/spec/lib/mail_handler/mail_handler_spec.rb
+++ b/spec/lib/mail_handler/mail_handler_spec.rb
@@ -9,4 +9,15 @@ describe 'when creating a mail object from raw data' do
mail.multipart?.should == true
end
+ it 'should parse multiple to addresses with unqoted display names' do
+ mail = get_fixture_mail('multiple-unquoted-display-names.email')
+ mail.to.should == ["request-66666-caa77777@whatdotheyknow.com", "foi@example.com"]
+ end
+
+ it 'should convert an iso8859 email to utf8' do
+ mail = get_fixture_mail('iso8859_2_raw_email.email')
+ mail.subject.should have_text(/gjatë/u)
+ mail.body.is_utf8?.should == true
+ end
+
end