diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-11-15 14:04:55 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-11-15 14:05:33 +0000 |
commit | 4bdab94e9d4f0a64647e5f8534c1fea8b4ba2809 (patch) | |
tree | 6071f4273cb98cedf1bfd54b7a415ac1717fce00 /spec/lib/tmail_extensions_spec.rb | |
parent | 8834f67db8cd94a0285dd1bb4702db834e08e995 (diff) |
Move TMail extensions to mail handler.
Diffstat (limited to 'spec/lib/tmail_extensions_spec.rb')
-rw-r--r-- | spec/lib/tmail_extensions_spec.rb | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/spec/lib/tmail_extensions_spec.rb b/spec/lib/tmail_extensions_spec.rb deleted file mode 100644 index bd89e6a84..000000000 --- a/spec/lib/tmail_extensions_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 -# This is a test of the set_content_type monkey patch in -# lib/tmail_extensions.rb - -require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') - -describe "when using TMail" do - - before(:each) do - ActionMailer::Base.deliveries.clear - end - - it "should load an email with funny MIME settings" do - # just send it to the holding pen - InfoRequest.holding_pen_request.incoming_messages.size.should == 0 - receive_incoming_mail("humberside-police-odd-mime-type.email", 'dummy') - InfoRequest.holding_pen_request.incoming_messages.size.should == 1 - - # clear the notification of new message in holding pen - deliveries = ActionMailer::Base.deliveries - deliveries.size.should == 1 - deliveries.clear - - incoming_message = InfoRequest.holding_pen_request.incoming_messages[0] - - # This will raise an error if the bug in TMail hasn't been fixed - incoming_message.get_body_for_html_display() - end - - it 'should parse multiple to addresses with unqoted display names' do - mail = TMail::Mail.parse(load_file_fixture('multiple-unquoted-display-names.email')) - 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 - |