diff --git a/test/fixtures/mail26.box b/test/fixtures/mail26.box new file mode 100644 index 000000000..a6813ec23 --- /dev/null +++ b/test/fixtures/mail26.box @@ -0,0 +1,91 @@ +Return-Path: +X-Original-To: billing@znuny.inc +Delivered-To: znuny-sales@arber.znuny.inc +Received: from mx01.gate.net (mx01.gate.net [1.116.118.5]) + by arber.znuny.inc (Postfix) with ESMTPS id C437A6024A + for ; Mon, 22 Dec 2014 09:56:10 +0100 (CET) +Received: from pfinz.srv.gate.net (pfinz.srv.gate.net [1.10.76.24]) + (using TLSv1 with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by mx01.gate.net (Postfix) with ESMTPS id CEE3D8084D5 + for ; Mon, 22 Dec 2014 09:56:08 +0100 (CET) +Received: from maild by pfinz.srv.gate.net with local (Exim 4.69) + (envelope-from ) + id 1Y2yme-00010q-NZ + for billing@znuny.inc; Mon, 22 Dec 2014 09:56:08 +0100 +MIME-Version: 1.0 +Content-Transfer-Encoding: binary +Content-Type: multipart/mixed; boundary="_----------=_141923856810152176" +Encoding: quoted-printable +X-Mailer: MIME::Lite 3.021 (F2.76; T1.24; A2.03; B3.07_01; Q3.07) +Date: Mon, 22 Dec 2014 09:56:08 +0100 +X-Tmpl: bookd_charge_credit_invoice +Subject: Ihre Rechnung als PDF-Dokument +To: "Martin Edenhofer" +From: gate +Message-Id: + +This is a multi-part message in MIME format. + +--_----------=_141923856810152176 +MIME-Version: 1.0 +Content-Transfer-Encoding: binary +Content-Type: multipart/alternative; boundary="_----------=_141923856810152177" +X-Mailer: MIME::Lite 3.021 (F2.76; T1.24; A2.03; B3.07_01; Q3.07) +Date: Mon, 22 Dec 2014 09:56:08 +0100 + +This is a multi-part message in MIME format. + +--_----------=_141923856810152177 +MIME-Version: 1.0 +Content-Disposition: inline +Content-Transfer-Encoding: quoted-printable +Content-Type: text/plain; charset=utf-8 +X-Mailer: MIME::Lite 3.021 (F2.76; T1.24; A2.03; B3.07_01; Q3.07) +Date: Mon, 22 Dec 2014 09:56:08 +0100 + +********************************************************************=0D + +gate Service=0D + +--------------------------------------------------------------------=0D + +gate GmbH * Gladbacher Str. 74 * 40219 D=C3=BCsseldorf=0D + + +--_----------=_141923856810152177 +MIME-Version: 1.0 +Content-Disposition: inline +Content-Length: 10540 +Content-Transfer-Encoding: binary +Content-Type: text/html; charset=utf-8 +X-Mailer: MIME::Lite 3.021 (F2.76; T1.24; A2.03; B3.07_01; Q3.07) +Date: Mon, 22 Dec 2014 09:56:08 +0100 + + + +Ihre Rechnung als PDF-Dokument + + + + + + +
+
+

+
+
+ + +--_----------=_141923856810152177-- + + +--_----------=_141923856810152176 +Content-Disposition: attachment; filename="invoice_gatede_B181347.txt" +Content-Transfer-Encoding: base64 +Content-Type: text/plain; name="invoice_gatede_B181347.txt" + +c29tZSB0ZXh0 + +--_----------=_141923856810152176-- diff --git a/test/unit/email_parser_test.rb b/test/unit/email_parser_test.rb index 28f27e327..892db75e4 100644 --- a/test/unit/email_parser_test.rb +++ b/test/unit/email_parser_test.rb @@ -531,6 +531,36 @@ end ", }, }, + { + :data => IO.read('test/fixtures/mail26.box'), + :body_md5 => 'c68fd31c71a463c7ea820ccdf672c680', + :params => { + :from => 'gate ', + :from_email => 'team@support.gate.de', + :from_display_name => 'gate', + :subject => 'Ihre Rechnung als PDF-Dokument', + :to => 'Martin Edenhofer ', + :body => "******************************************************************** + +gate Service + +-------------------------------------------------------------------- + +gate GmbH * Gladbacher Str. 74 * 40219 Düsseldorf + +", + }, + :attachments => [ + { + :md5 => '5d6a49a266987af128bb7254abcb2896', + :filename => 'message.html', + }, + { + :md5 => '552e21cd4cd9918678e3c1a0df491bc3', + :filename => 'invoice_gatede_B181347.txt', + }, + ], + }, ] files.each { |file|