From f19257e79383dacff878272d1dec3fd8644df715 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Tue, 25 Jun 2013 13:48:54 -0700 Subject: Add test case and fix for unrecognized encoding in subject line --- spec/lib/mail_handler/mail_handler_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/lib/mail_handler/mail_handler_spec.rb') diff --git a/spec/lib/mail_handler/mail_handler_spec.rb b/spec/lib/mail_handler/mail_handler_spec.rb index d6e7ba5d2..241ce06c1 100644 --- a/spec/lib/mail_handler/mail_handler_spec.rb +++ b/spec/lib/mail_handler/mail_handler_spec.rb @@ -60,6 +60,11 @@ describe 'when creating a mail object from raw data' do body.should match(/ \xe2\x80\x93 /) end + it 'should not error on a subject line with an encoding encoding not recognized by iconv' do + mail = get_fixture_mail('unrecognized-encoding-mail.email') + lambda{ mail.subject }.should_not raise_error + end + end describe 'when asked for the from name' do -- cgit v1.2.3