Improved tests.

This commit is contained in:
Martin Edenhofer 2015-01-08 15:40:44 +01:00
parent a9836b5586
commit 8425316a88
2 changed files with 96 additions and 0 deletions

66
test/fixtures/mail29.box vendored Normal file
View file

@ -0,0 +1,66 @@
Return-Path: <sales@example.com>
X-Original-To: info@znuny.inc
Delivered-To: znuny-sales@arber.znuny.inc
Received: from tvweb01.example.com (tvweb01.example.com [46.163.100.194])
by arber.znuny.inc (Postfix) with ESMTP id 968B65FEA3
for <info@znuny.inc>; Wed, 7 Jan 2015 13:19:14 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed;
s=s1024;d=example.com;
h=mime-version:from:to:date:subject:content-type:message-id;
bh=zK+PkYiiKU1DhbYV/4TtBgNk7uo=;
b=k/6PAyL/rETRuhqEiojQu5ik9zznLdejqT54jdemsm8W7bJ2RAAzcSS0wcUerkfxSiLTbgkG
Czsmd7hA5vhLLJ3GJmntQQVEL/2YEnjM0M7JsomkRPTaQ1Z+SoRmxCTOfYobQWqQO4LnZYVj
v0l93lwKk6xupEkEZxywHK7fo98=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
s=s1024;d=example.com;
h=mime-version:from:to:date:subject:content-type:message-id;
b=IwMtmGbwRPbbvNZXzW2HA+a91T3PgoOAwub4WaayMEf+t9hq2/1AhD9bVMwqM2OqUJ+HRlL5
++Qf5txSej/ysoMZU0F74Z2B4E1WPBpsNF6pifg2KdeB511FaT5C+NWKOUJ9m3kAsknPuZKS
m1uSUJ7fkUkRb0jstFF3WKwSS1M=
Received: from tvweb01 ([46.163.100.194]) by tvweb01.example.com with Microsoft SMTPSVC(7.5.7601.17514);
Wed, 7 Jan 2015 13:18:00 +0100
MIME-Version: 1.0
From: "Example Sales" <sales@example.com>
To: info@znuny.inc
Date: 7 Jan 2015 13:18:00 +0100
Subject: Example licensing information: No channel available
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
Message-ID: <TVWEB01QZcflrsYbMea00101f2b@tvweb01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AqIDczMDM3IEfDtnBwaW5nZW4gKiBHZXJtYW55
PGJyIC8+DQogIFRlbC4gMDcxNjEgNjA2OTIgNTAgKiBGYXggMDcxNjEgNjA2OTIgNzk8
YnIgLz4NCiAgPGJyIC8+DQogIFJlZ2lzdHJhdGlvbiBBRyBVbG0gSFJCIDUzNDA3NSAq
IEdlbmVyYWwgTWFuYWdlciBIb2xnZXIgRmVsZ25lcjxiciAvPg0KICA8YnIgLz4NCiAg
PHNwYW4gY2xhc3M9InVuc3Vic2NyaWJlIj48L3NwYW4+DQogIDxiciAvPg0KPC9zcGFu
Pg0KPC9ib2R5Pg0KPC9odG1sPg==

View file

@ -568,6 +568,36 @@ gate GmbH * Gladbacher Str. 74 * 40219 Düsseldorf
}, },
], ],
}, },
{
:data => IO.read('test/fixtures/mail29.box'),
:body_md5 => 'b6cc8164ce896046d631ddd44f8c9f6e',
:params => {
:from => 'Example Sales <sales@example.com>',
:from_email => 'sales@example.com',
:from_display_name => "Example Sales",
:subject => "Example licensing information: No channel available",
:to => 'info@znuny.inc',
:body => "Dear Mr. Edenhofer,We want to keep you updated on TeamViewer licensing shortages on a regular basis.
We would like to inform you that since the last message on 25-Nov-2014 there have been temporary session channel exceedances which make it impossible to establish more sessions. Since the last e-mail this has occurred in a total of 1 cases.
Additional session channels can be added at any time. Please visit our [1] TeamViewer Online Shop for pricing information.
Thank you - and again all the best with TeamViewer!
Best regards,
Your TeamViewer Team
P.S.: You receive this e-mail because you are listed in our database as person who ordered a TeamViewer license. Please click [2] here to unsubscribe from further e-mails.
-----------------------------
[3] www.teamviewer.com
TeamViewer GmbH * Jahnstr. 30 * 73037 Göppingen * Germany
Tel. 07161 60692 50 * Fax 07161 60692 79
Registration AG Ulm HRB 534075 * General Manager Holger Felgner
[1] https://www.teamviewer.com/en/licensing/update.aspx?channel=D842CS9BF85-P1009645N-348785E76E
[2] http://www.teamviewer.com/en/company/unsubscribe.aspx?id=1009645&ident=E37682EAC65E8CA6FF36074907D8BC14
[3] http://www.teamviewer.com",
},
},
] ]
files.each { |file| files.each { |file|