diff options
Diffstat (limited to 'spec/fixtures')
12 files changed, 207 insertions, 20 deletions
diff --git a/spec/fixtures/files/document-pdf.email b/spec/fixtures/files/document-pdf.email new file mode 100644 index 000000000..f4fc6f0fe --- /dev/null +++ b/spec/fixtures/files/document-pdf.email @@ -0,0 +1,110 @@ +From authority@example.org Tue Dec 3 11:13:02 2013 +Return-path: <authority@example.org> +Envelope-to: requester@example.org +Delivery-date: Tue, 03 Dec 2013 11:13:00 +0000 +From: Test Authority <authority@example.org> +To: requester@example.org +Subject: testing a PDF attachment with the wrong content-type +Date: Tue, 03 Dec 2013 11:12:45 +0000 +Message-ID: <87li09xuasdfasdfpoija@blahblah> +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="=-=-=" + +--=-=-= +Content-Type: text/plain + +Here's a PDF attachement which has a document/pdf content-type, +when it really should be application/pdf. + + +--=-=-= +Content-Type: application/pdf +Content-Disposition: attachment; filename=tiny-example.pdf +Content-Transfer-Encoding: base64 +Content-Description: a very small example PDF + +JVBERi0xLjUKJbXtrvsKMyAwIG9iago8PCAvTGVuZ3RoIDQgMCBSCiAgIC9GaWx0ZXIgL0ZsYXRl +RGVjb2RlCj4+CnN0cmVhbQp4nCvkMlAAwaJ0Bf1EA4X0Yi6nEC5DA1M9IwNLYzNjsBwS18hIz9TI +0tBSwdzIQs/Y3MLAzEQhJJdLP03XQBeoUCEkjStawyM1JydfUTM2xIvLNYQrkAsAJG8VmQplbmRz +dHJlYW0KZW5kb2JqCjQgMCBvYmoKICAgOTIKZW5kb2JqCjIgMCBvYmoKPDwKICAgL0V4dEdTdGF0 +ZSA8PAogICAgICAvYTAgPDwgL0NBIDEgL2NhIDEgPj4KICAgPj4KICAgL0ZvbnQgPDwKICAgICAg +L2YtMC0wIDUgMCBSCiAgID4+Cj4+CmVuZG9iago2IDAgb2JqCjw8IC9UeXBlIC9QYWdlCiAgIC9Q +YXJlbnQgMSAwIFIKICAgL01lZGlhQm94IFsgMCAwIDU5NS4yNzU1NzQgODQx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MDAwMDAgbiAKMDAwMDAwMDAx +NSAwMDAwMCBuIAowMDAwMDAwMTg0IDAwMDAwIG4gCjAwMDAwMDM2NzkgMDAwMDAgbiAKMDAwMDAw +MDMxNCAwMDAwMCBuIAowMDAwMDAwNTQyIDAwMDAwIG4gCjAwMDAwMDMwMzggMDAwMDAgbiAKMDAw +MDAwMzA2MSAwMDAwMCBuIAowMDAwMDAzMzg1IDAwMDAwIG4gCjAwMDAwMDM0MDggMDAwMDAgbiAK +MDAwMDAwNDEyNyAwMDAwMCBuIAowMDAwMDA0MjU3IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUg +MTQKICAgL1Jvb3QgMTMgMCBSCiAgIC9JbmZvIDEyIDAgUgo+PgpzdGFydHhyZWYKNDMxMAolJUVP +Rgo= +--=-=-=-- + diff --git a/spec/fixtures/files/email-folding-example-1.txt.expected b/spec/fixtures/files/email-folding-example-1.txt.expected index 801542288..45dabf156 100644 --- a/spec/fixtures/files/email-folding-example-1.txt.expected +++ b/spec/fixtures/files/email-folding-example-1.txt.expected @@ -8,3 +8,10 @@ On behalf of James Hall, Chief Executive Identity and Passport Service <<9032 C Pollard final response.doc>> +FOLDED_QUOTED_SECTION + +FOLDED_QUOTED_SECTION + + +FOLDED_QUOTED_SECTION + diff --git a/spec/fixtures/files/email-folding-example-10.txt b/spec/fixtures/files/email-folding-example-10.txt index 0fabb7f9c..a0773e6ff 100644 --- a/spec/fixtures/files/email-folding-example-10.txt +++ b/spec/fixtures/files/email-folding-example-10.txt @@ -3,13 +3,13 @@ Department of Health, please visit the 'Contact us' page on the Department’s website. ----------------------------------------------------------------------------------------- - - Apologies that you were not able to read our previous response of 4 - October. Please find the text of that email below. - + + Apologies that you were not able to read our previous response of 4 + October. Please find the text of that email below. + Our ref: DE00000642471 -Dear Ms Peters Rock, +Dear Ms Peters Rock, You requested your correspondence to be treated under the Freedom of Information Act. However, as your correspondence asked for general @@ -19,7 +19,7 @@ correspondence under the provisions of the Act. I am sorry I cannot be more helpful. -Yours sincerely, +Yours sincerely, Simon Dove Customer Service Centre Department of Health diff --git a/spec/fixtures/files/email-folding-example-10.txt.expected b/spec/fixtures/files/email-folding-example-10.txt.expected index e4f704c0e..5b609dc12 100644 --- a/spec/fixtures/files/email-folding-example-10.txt.expected +++ b/spec/fixtures/files/email-folding-example-10.txt.expected @@ -3,13 +3,13 @@ Department of Health, please visit the 'Contact us' page on the Department’s website. ----------------------------------------------------------------------------------------- - - Apologies that you were not able to read our previous response of 4 - October. Please find the text of that email below. - + + Apologies that you were not able to read our previous response of 4 + October. Please find the text of that email below. + Our ref: DE00000642471 -Dear Ms Peters Rock, +Dear Ms Peters Rock, You requested your correspondence to be treated under the Freedom of Information Act. However, as your correspondence asked for general @@ -19,7 +19,8 @@ correspondence under the provisions of the Act. I am sorry I cannot be more helpful. -Yours sincerely, +Yours sincerely, Simon Dove Customer Service Centre Department of Health +FOLDED_QUOTED_SECTION diff --git a/spec/fixtures/files/email-folding-example-11.txt b/spec/fixtures/files/email-folding-example-11.txt new file mode 100644 index 000000000..635d7aa4f --- /dev/null +++ b/spec/fixtures/files/email-folding-example-11.txt @@ -0,0 +1,45 @@ + Hello Example, + + This is a reply to your test request Nov 28. + + Regards. + + On Thu, Nov 28, 2013 at 9:08 AM, Example User + <[1]request-x-xxx@xxx.com> wrote: + + Dear Test Authority, + + This is the request body. + + Yours faithfully, + + Example User + + ------------------------------------------------------------------- + + Please use this email address for all replies to this request: + [2]request-x-xxx@xxx.com + + Is [3]testauthority@example.com the wrong address for Freedom of + Information requests to AYG Test Authority? If so, please contact us + using this form: + [4]http://example.com/help/contact + + Disclaimer: This message and any reply that you make will be published + on the internet. Our privacy and copyright policies: + [5]http://example.com/help/officers + + If you find this service useful as an FOI officer, please ask your web + manager to link to us from your organisation's FOI page. + + ------------------------------------------------------------------- + +References + + Visible links + 1. mailto:request-x-xxx@xxx.com + 2. mailto:request-x-xxx@xxx.com + 3. mailto:testauthority@example.com + 4. http://example.com/help/contact + 5. http://example.com/help/officers + diff --git a/spec/fixtures/files/email-folding-example-11.txt.expected b/spec/fixtures/files/email-folding-example-11.txt.expected new file mode 100644 index 000000000..e336062c7 --- /dev/null +++ b/spec/fixtures/files/email-folding-example-11.txt.expected @@ -0,0 +1,8 @@ + Hello Example, + + This is a reply to your test request Nov 28. + + Regards. + + +FOLDED_QUOTED_SECTION diff --git a/spec/fixtures/files/email-folding-example-2.txt.expected b/spec/fixtures/files/email-folding-example-2.txt.expected index e52fbe443..df578390d 100644 --- a/spec/fixtures/files/email-folding-example-2.txt.expected +++ b/spec/fixtures/files/email-folding-example-2.txt.expected @@ -2,3 +2,4 @@ Preface to the message which we are not interested in ----------------------------------------------------------------------------------------- Important message about cheese +FOLDED_QUOTED_SECTION diff --git a/spec/fixtures/files/email-folding-example-3.txt.expected b/spec/fixtures/files/email-folding-example-3.txt.expected index e2cca4933..accb40150 100644 --- a/spec/fixtures/files/email-folding-example-3.txt.expected +++ b/spec/fixtures/files/email-folding-example-3.txt.expected @@ -3,3 +3,10 @@ Reference : T3241/8 Thank you for your e-mail enquiry of 12th February. A reply is attached. +FOLDED_QUOTED_SECTION + +FOLDED_QUOTED_SECTION + + +FOLDED_QUOTED_SECTION + diff --git a/spec/fixtures/files/email-folding-example-5.txt.expected b/spec/fixtures/files/email-folding-example-5.txt.expected index fbb0f0f50..46d7f731a 100644 --- a/spec/fixtures/files/email-folding-example-5.txt.expected +++ b/spec/fixtures/files/email-folding-example-5.txt.expected @@ -1,11 +1,11 @@ Hi Simon -My apologies for timescale of response. The data forwarded is a public -register, and is updated on a frequent and regular basis; your request -unfortunately coincided with annual leave and a monthly update of the -spreadsheet. As the definition of an HMO under the Housing Act 2004 -differs to that under planning legislation, I have forwarded this and -your original request on to Andy England, Development Control Manager to +My apologies for timescale of response. The data forwarded is a public +register, and is updated on a frequent and regular basis; your request +unfortunately coincided with annual leave and a monthly update of the +spreadsheet. As the definition of an HMO under the Housing Act 2004 +differs to that under planning legislation, I have forwarded this and +your original request on to Andy England, Development Control Manager to respond independantly. If I can be of further assistance please contact me diff --git a/spec/fixtures/files/email-folding-example-7.txt.expected b/spec/fixtures/files/email-folding-example-7.txt.expected index 0ef8fd82b..cb6961038 100644 --- a/spec/fixtures/files/email-folding-example-7.txt.expected +++ b/spec/fixtures/files/email-folding-example-7.txt.expected @@ -13,4 +13,5 @@ Telephone +44 (0) 116 2222222 Extn 5221 VM No. 8035 Fax + 44 (0) 116 2485217 -<<0001_00035908_Resp_12RESPONSE LETTER_20080408_112311_01.TIF>>
\ No newline at end of file +<<0001_00035908_Resp_12RESPONSE LETTER_20080408_112311_01.TIF>> +FOLDED_QUOTED_SECTION diff --git a/spec/fixtures/files/email-folding-example-8.txt.expected b/spec/fixtures/files/email-folding-example-8.txt.expected index b5dc10c0d..e8c08f4ca 100644 --- a/spec/fixtures/files/email-folding-example-8.txt.expected +++ b/spec/fixtures/files/email-folding-example-8.txt.expected @@ -3,4 +3,5 @@ I will be out of the office starting 11/04/2008 and will not return until I will respond to your message when I return. If you have any urgent queries please ring 02085419088 for Legal Business Support queries or -contact Eileen Perren for FOI or DP queries
\ No newline at end of file +contact Eileen Perren for FOI or DP queries +FOLDED_QUOTED_SECTION diff --git a/spec/fixtures/files/email-folding-example-9.txt.expected b/spec/fixtures/files/email-folding-example-9.txt.expected index 2d2381a34..d222e9438 100644 --- a/spec/fixtures/files/email-folding-example-9.txt.expected +++ b/spec/fixtures/files/email-folding-example-9.txt.expected @@ -7,3 +7,9 @@ Yours sincerely MICHAEL HEGARTY FOI Officer +FOLDED_QUOTED_SECTION + +FOLDED_QUOTED_SECTION + + +FOLDED_QUOTED_SECTION |