aboutsummaryrefslogtreecommitdiffstats
path: root/spec/fixtures
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
|
* User profile option to filter requests by statusGareth Rees2014-10-14-1/+3
| | | | | Filters on `latest_status` because filtering by `status` searches all states a request has ever been in.
* Merge branch 'issues/337-attachment-title' into rails-3-developGareth Rees2014-04-14-0/+14
|\
| * 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.
* | Annotate modelsGareth Rees2014-04-09-19/+21
|/ | | | | Should have been run after related migrations. Could automate this to always run after migrations.
* 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 timestamps to public_body_translation fixtures.Louise Crow2013-11-29-0/+20
| | | | | | | | | | Between rails 3.2.0 and 4.0.1rc4, timestamps were constrained to be non-null. As globalize creates the public_body_translation table with timestamps, this means there are errors in the tests when trying to insert the fixture data, which doesn't have timestamps. These errors were only appearing on Travis because locally the test database is cloned from the development structure rather than being created by running the migrations.
* Add a info_requests_visible_classified_count column to PublicBodyMark Longair2013-11-05-20/+28
| | | | | | This counts only those info requests that have prominence 'normal' (i.e. are not hidden) and are not 'awaiting_description' (i.e. that they have had some basic status classification).
* Update the helpful model schema annotationsMark Longair2013-11-01-19/+22
| | | | These are regenerated with "bundle exec annotate"
* Add data to test example given in #1143Louise Crow2013-10-21-0/+2
| | | | This causes several specs to fail.
* Add to fixtures a public body with an accented initial letterMark Longair2013-10-04-0/+30
| | | | | | | | | | | | | | | | | This adds a public body called "Åčçèñtéd Authority" in the Czech locale (cs) so that we can create tests that exercise, for example, searching based on an initial letter that has a multi-byte representation in UTF-8. An old test for "add mass tags" in the admin needed to be updated since it implicitly assumed that all the public bodies in the fixtures had translations in the :en locale. The tests for loading CSV files of public bodies also needed to be updated, since they were assuming that public body names only contained letters in [A-Za-z ]. Since Unicode character classes aren't easily available in Ruby 1.8 and it makes little difference to the test, the character class is replaced by '.'.
* Merge branch 'feature/hide-individual-responses' into rails-3-developLouise Crow2013-09-17-12/+175
|\ | | | | | | | | | | | | | | | | | | | | 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
| |
| * Adding prominence_reason to IncomingMessage.Louise Crow2013-09-16-0/+1
| |
| * Add prominence to incoming message.Louise Crow2013-09-16-0/+1
| |
| * Re-annotate models with database fieldsLouise Crow2013-09-16-0/+173
| |
| * Remove prominence.Louise Crow2013-09-16-12/+0
| | | | | | | | | | | | | | Add a migration to remove the unused column 'prominence' from info_request_events, remove validation of prominence, remove unused InfoRequestEvent.user_can_view? method. Remove references to InfoRequestEvent.prominence.
* | Add a test for the PublicBodyController statistics actionMark Longair2013-08-20-0/+18
| |
* | Try to convert csv files of public bodies into utf-8 before importing them.Louise Crow2013-08-14-0/+1
|/
* Patch Globalize to compensate for the way gettext_i18n_rails patches ↵Louise Crow2013-07-23-0/+14
| | | | 118n.locale in the handling of locales with underscores. Fixes #999.
* Add test case and fix for unrecognized encoding in subject lineLouise Crow2013-06-25-0/+36
|
* Explicitly set I18n.locale in set_gettext_locale in order to get Rails to ↵0.11.0.13hotfix/0.11.0.13Louise Crow2013-06-17-0/+2
| | | | expire the template cache and trigger a lookup.
* 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.
* Merge branch 'release/0.9' into rails-3-developLouise Crow2013-04-24-306/+243
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock app/controllers/public_body_controller.rb app/mailers/track_mailer.rb app/views/request/_hidden_correspondence.html.erb app/views/request/_sidebar.html.erb app/views/request/hidden.html.erb app/views/request/new_please_describe.html.erb app/views/request/preview.html.erb app/views/user/show.html.erb config/environment.rb config/routes.rb spec/controllers/public_body_controller_spec.rb
| * Remove trailing space.Louise Crow2013-04-16-2/+2
| |
| * Merge branch 'feature/final-consistent-translation-interpolation' into developLouise Crow2013-04-16-278/+221
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: app/models/outgoing_message.rb app/views/general/search.rhtml app/views/public_body/list.rhtml app/views/public_body/show.rhtml app/views/public_body/view_email.rhtml app/views/request/_after_actions.rhtml app/views/request/_followup.rhtml app/views/request/_sidebar.rhtml app/views/request/new.rhtml app/views/request/select_authority.rhtml app/views/request/upload_response.rhtml locale/aln/app.po locale/app.pot locale/ar/app.po locale/bs/app.po locale/ca/app.po locale/cs/app.po locale/cy/app.po locale/de/app.po locale/en/app.po locale/en_IE/app.po locale/es/app.po locale/eu/app.po locale/fr/app.po locale/gl/app.po locale/hu_HU/app.po locale/id/app.po locale/nb_NO/app.po locale/pt_BR/app.po locale/ro_RO/app.po locale/sl/app.po locale/sq/app.po locale/sr@latin/app.po locale/tr/app.po locale/uk/app.po
| | * Removing unused translation stringMatthew Landauer2013-04-15-18/+0
| | |
| | * In translation strings replace %s with {{}} formattingMatthew Landauer2013-04-15-4/+4
| | |
| | * In translation strings replace %s with {{}} formattingMatthew Landauer2013-04-15-13/+4
| | | | | | | | | | | | | | | | | | | | | Conflicts: locale/eu/app.po locale/sq/app.po
| | * In translation strings replace %{} with {{}} formattingMatthew Landauer2013-04-15-6/+4
| | |
| | * Replace %s with {{}} in "Everything that you enter on this page..."Louise Crow2013-04-15-8/+8
| | |