aboutsummaryrefslogtreecommitdiffstats
path: root/spec/fixtures/files
Commit message (Collapse)AuthorAgeLines
* Give example csv file .csv extensionLouise Crow2015-02-23-0/+0
|
* Test localised value for import against existing localised valueLouise Crow2015-02-23-0/+2
| | | | | | | | | Previously the call to public_body.send would return the value for the default locale if no value was set in the current locale, meaning that translations for attributes that were the same as the attribute values in the default locale were not being loaded. Fixes #2134.
* Merge branch 'hotfix/0.20.0.2' into rails-3-developLouise Crow2015-01-07-1/+8
|\
| * Sanitize the blog contents0.20.0.2Louise Crow2014-12-22-1/+1
| |
| * Sanitize the contents of HTML attachments before displayLouise Crow2014-12-22-0/+7
| |
* | Allow import of holidays from feed or built-in suggestionsLouise Crow2014-12-15-0/+22
|/
* Add fix for Apple Mail with attachments Gareth Rees2014-11-04-0/+13782
|
* Add an AttachmentToHTML::View to deal with renderingGareth Rees2014-04-07-0/+2
|
* Add AttachmentToHTML libraryGareth Rees2014-03-28-0/+12
| | | | | | | | | | | | Extracts the attachment processing from FoiAttachment#body_to_html AttachmentToHTML contains adapters which convert - text/plain - application/pdf - application/rtf Results are returned as an AttachmentHTML::HTML instance which contains the raw HTML and other metadata about the conversion.
* Handle gmail-style quoting from the HTML part of a mail.Louise Crow2014-01-22-0/+53
| | | | | | | We already handled this type of quoting when coming directly from a text part of a mail, but when we choose the HTML part as the main part and then convert it to text, the 'On [date] <email> person said:' part can get split over two lines.
* Tighten up expectation, make expected files consistent.Louise Crow2014-01-17-20/+44
| | | | | | | Just expecting the parsed file to include the expected one would mean success in the case where nothing has been folded. Tighten up the expectation, and add quoting placeholders to expected files that didn't have them.
* Treat any document/pdf attachment as if it were application/pdfMark Longair2013-12-03-0/+110
| | | | | | | | | | | | | | | | | This is a fix for issue #1232. Richard Taylor pointed out that some PDF attachments had the non-standard content-type document/pdf, and that these weren't being treated as PDFs. (Ganesh Sittampalam discovered that all of these PDFs were generated by a Lexmark X945e, according to the PDF metadata.) This commit adds an extra case to normalise_content_type to map document/pdf to application/pdf. In fact, since the upgrade of the Mail gem in ccebe3c3d6d4dc5f81 the behaviour when handling the non-standard content-type document/pdf was much better, but this commit also means that you get the right icon for the attachment, and can be cherry-picked onto older versions to fix #1232.
* Add data to test example given in #1143Louise Crow2013-10-21-0/+2
| | | | This causes several specs to fail.
* Merge branch 'feature/hide-individual-responses' into rails-3-developLouise Crow2013-09-17-0/+0
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile app/views/admin_request/edit_outgoing.html.erb config/packages doc/CHANGES.md doc/INSTALL.md spec/models/info_request_spec.rb spec/models/public_body_spec.rb
| * Use a real pdf file for foi_attachment factory.Louise Crow2013-09-16-0/+0
| |
* | Try to convert csv files of public bodies into utf-8 before importing them.Louise Crow2013-08-14-0/+1
|/
* Add test case and fix for unrecognized encoding in subject lineLouise Crow2013-06-25-0/+36
|
* Fix for subject lines with invalid UTF-8 as the last characterMark Longair2013-06-03-0/+10
| | | | | | | | | | | | | | | This seems to be the bug mentioned here: http://po-ru.com/diary/fixing-invalid-utf-8-in-ruby-revisited/ That explains that some versions of Iconv don't ignore invalid characters when converting to UTF-8 even with //IGNORE if that invalid character happens to be at the end of the string. In fact, as Matthew Somerville pointed out, with some versions of iconv (e.g. 1.14 on Mac OS, apparently) it's necessary to add and remove more than one space at the end, in case the first character of the byte sequence indicates a long sequence. We add and remove 4 to be on the safe side.
* Make an attachment filename in test fixtures more difficultMark Longair2013-05-24-2/+2
| | | | | | | | | | | | | This commit changes 'hello.txt' to 'hello-world.txt' in the incoming-request-two-same-name.email fixture. The reasoning for this change is that if there are no special characters in the filename then filename and display_filename will be the same and the tests won't pick up any confusion between the two. The test requests to :get_attachment and :get_attachment_as_html should get the display_filename rather than filename.
* Retain old handling of malformed addresses in To and Cc linesMark Longair2013-05-21-0/+11
| | | | | | | | | | The behaviour of the TMail backend's 'to' and 'cc' methods where there was a malformed To: or Cc: line was to return nil, whereas Mail returns a version of the string anyway. We'd have to change quite a lot of code to deal with an extra possible class of returned objects, so it's simplest for the moment to monkey-patch Mail::Message's 'to' and 'cc' methods to restore the old behaviour.
* Avoid an FoiAttachment validation failure under Rails 3Mark Longair2013-05-16-0/+27
| | | | | | | | | | | Under Rails 3, the uudecoded FoiAttachment in this test fails validation at the self.save! in IncomingMessage.parse_raw_email, although the FoiAttachment has been correctly created and saved to the database in _uudecode_and_save_attachments. Forcing a reload=true on self.foi_attachments fixes this. Thanks to Louise Crow for finding the fix for this problem.
* Add failing test for case where a mail part has a content-type header with ↵Louise Crow2013-05-16-0/+38
| | | | no charset field.
* Add a new example for unconvertible-to-UTF-8 text part dataMark Longair2013-05-16-0/+30
| | | | | | | | | | | The example file that was used for checking for text attachment data which could not be converted to UTF-8 is one that we *can* actually deal with by guessing the character set, since it's valid GB18030. So, this commit changes that test to check for the first few Chinese characters in that email, and introduces a replacement test with text from /dev/random, which should not be interpretable in any sensible way.
* Add a test for parsing a malformed emailMark Longair2013-05-16-0/+20
| | | | | | | This example email indicates the wrong charset and includes a top bit set character despite Content-Transfer-Encoding: 7bit - nonetheless, we should be able to convert it to UTF-8 and interpret the character correctly.
* Add a test for a missing final MIME boundaryMark Longair2013-05-16-0/+21
| | | | | | | | | If there is a missing final MIME boundary, the behaviour of Alaveteli with the TMail backend was to still parse the attachment, but with the new code it currently throws an exception. This commit adds a test that asserts that the attachment should be parsed despite the email being malformed in this way.
* Add a test to check that anything in the MIME epilogue is ignoredMark Longair2013-05-16-0/+110
| | | | | | | | | | | There is currently a difference in behaviour in the parsing of nested MIME multipart attachments between the Mail and TMail based backends. This commit adds a test that will pass if the behaviour is the same as the the old (TMail-based) version, which I believe is correct according to RFC 1521. The example email has a PNG attachment after the final MIME boundary, and the RFC says that anything after the final boundary ("the epilogue") should be ignored.
* Add tests for TNEF attachments that should be handledMark Longair2013-05-16-0/+230
| | | | | | | | | | | These two cases were ignored previously, and we need to make sure that they still are under the switch from TMail to Mail. One TNEF attachment is a heavily truncated one from a real example from Alaveteli that has no personal data in it. The other is an example from the tests in the distribution of the tnef package for Ubuntu 1.4.9-1 - it's an HTML version of the US constitution.
* Remove debian-specific require clause and use Gemfile to specify ↵Louise Crow2013-04-30-0/+39
| | | | non-standard require - bundler should be supplying the gem now.
* Use an empty incoming email to avoid interaction with other tests.Louise Crow2013-02-17-0/+8
|
* Convert url in comment to spec.Louise Crow2012-12-06-0/+31
| | | | | | Conflicts: lib/mail_handler/backends/tmail_backend.rb
* Convert example URL to spec.Louise Crow2012-12-06-0/+451
|
* Fix syntax of example email. The number of expected attachments was based on ↵Louise Crow2012-12-04-3/+2
| | | | the specific handling of a bad end boundary in tmail.
* Add spec for handling an RFC822 attachment.Louise Crow2012-12-04-0/+147
| | | | | | Conflicts: spec/models/incoming_message_spec.rb
* Add spec for the adding of headers to plain text bodies in attachments.Louise Crow2012-12-04-0/+50
|
* Move method for getting the to, cc and envelope-to addresses of a mail to ↵Louise Crow2012-12-04-12/+13
| | | | the mail handler.
* Convert example in comment to failing spec, update regex to make spec pass - ↵Louise Crow2012-10-18-0/+318
| | | | again the use of converted HTML parts in emails means extra leading spaces.
* Convert request cited in comment to failing spec, update regex to make it ↵Louise Crow2012-10-18-0/+73
| | | | pass (we now use the HTML parts of emails by preference, so there are some leading spaces.)
* In fact, the message in the example URL was not being folded properly ↵Louise Crow2012-10-11-0/+112
| | | | anymore. Add a failing spec using it as an example.
* Add test for handling a multipart mail with a linebreak in the boundary.Louise Crow2012-10-11-0/+37
|
* Handle the case where an incoming message is badly encoded and has no ↵Louise Crow2012-10-09-0/+38
| | | | charset on the part we're using as a main part.
* Handle yet another style of bounceRobin Houston2012-05-01-0/+168
|
* Recognise another variety of bounce messageRobin Houston2012-04-30-0/+513
|
* Test duplicate requests are coalescedRobin Houston2012-01-29-0/+34
| | | | Test that duplicate requests are coalesced on the front page.
* More test data, and fix testsRobin Houston2012-01-29-0/+19
| | | | | | Add some more test data, and fix the tests to accommodate both this new test data and the fact that raw emails are now correctly loaded into the test environment.
* Load all raw emails for testingRobin Houston2012-01-29-0/+20
| | | | | | | | | | | Previously there was just one raw email, and the test code relied on that fact. Generalise it to handle multiple raw emails. This change causes a number of tests to fail, because it exposes failures that should have happened when the second raw email was added but were masked by the fact that the text of this second raw email was never loaded. These failures will be fixed in the next commit.
* Don't give error when viewing HTML versions. Fixes issue #321Seb Bacon2012-01-08-0/+543
|
* Display internationalized emails correctly (specifically, RFC2047 headers, ↵Seb Bacon2012-01-04-0/+462
| | | | and HTML emails with encoding in a meta-tag). Fixes #281
* Recognise a couple of newly-seen types of out-of-office messageRobin Houston2011-12-30-0/+667
|
* Improve signature folding regexp. Fixes issue #253.Seb Bacon2011-10-11-0/+417
|
* Extra tests to sanity check UTF conversion (see issue #128 for background)Seb Bacon2011-10-10-0/+68
|