aboutsummaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeLines
...
| * | Cope with replying to a message with a missing or empty SubjectMark Longair2013-06-07-0/+12
| | | | | | | | | | | | | | | | | | Conflicts: spec/models/info_request_spec.rb
* | | Merge branch 'hotfix/0.11.0.4' into rails-3-developLouise Crow2013-06-10-3/+14
|\| |
| * | We're assuming feed urls without format suffixes should serve up atom/xml, ↵0.11.0.4hotfix/0.11.0.4Louise Crow2013-06-05-0/+12
| | | | | | | | | | | | so ignore any format from content negotiation in favour of that default.
| * | Merge branch 'release/0.11'0.11.0.3Louise Crow2013-06-04-863/+1772
| |\ \
| * | | Use class instead of type - type is removed in Ruby 1.90.9.0.6hotfix/0.9.0.6Louise Crow2013-05-28-1/+1
| | | |
| * | | Return a string from user.name always to avoid any complications with other ↵hotfix/0.9.0.5Louise Crow2013-05-28-3/+14
| | | | | | | | | | | | | | | | functions calling gsub on the result. SafeBuffer won't work with gsub until Rails 3.2 https://github.com/rails/rails/commit/b4a6e2f8442ceda118367f9a61c38af754be1cbf
| * | | Bugfix for the case where a suspended user sends a contact message. Their ↵hotfix/0.9.0.2Louise Crow2013-05-07-1/+15
| | | | | | | | | | | | | | | | name (with the '(account suspended)' suffix) is marked by the translation call as HTML safe, so escapes the angled brackets when they are appended to it in the contact mailer code. Use string interpolation instead.
* | | | Remove reference to incoming message from purge request test - it brings in ↵Louise Crow2013-06-07-1/+1
| | | | | | | | | | | | | | | | a requirement to have loaded the raw emails, which is tangential to what we're testing.
* | | | Replace specs that left raw email (stored in a file, so not cleaned up ↵Louise Crow2013-06-07-59/+52
| | | | | | | | | | | | | | | | automatically) in a dirty state. The functionality of the old specs is tested in spec/lib/mail_handler.rb, so remove them and add some new specs that just test the OutgoingMailer methods.
* | | | Allow the donation url to be configured. Closes #909.Louise Crow2013-06-07-0/+28
| | | |
* | | | Add some context blocks to group together tests with the same status.Louise Crow2013-06-07-57/+103
| | | |
* | | | Handle request for json for an external request. Closes #973.Louise Crow2013-06-07-0/+29
| | | |
* | | | We're assuming feed urls without format suffixes should serve up atom/xml, ↵Louise Crow2013-06-05-0/+12
| | | | | | | | | | | | | | | | so ignore any format from content negotiation in favour of that default.
* | | | Remove support for theme stylesheet inclusion via template deprecated in ↵Louise Crow2013-06-05-1/+0
| | | | | | | | | | | | | | | | version 0.5. Closes #972.
* | | | Restore coveralls config.Louise Crow2013-06-04-0/+12
| | | |
* | | | Merge branch 'release/0.11' into rails-3-developLouise Crow2013-06-04-7/+88
|\ \ \ \ | | |/ / | |/| |
| * | | Handle json requests for hidden info requests.Louise Crow2013-06-03-7/+32
| | | |
| * | | For non-HTML requests, just return the response code for now.Louise Crow2013-06-03-0/+17
| | | |
| * | | Parse the 'to' address as if on a real mail to trigger quoted string encoding.Louise Crow2013-06-03-0/+16
| | | |
| * | | Fix for subject lines with invalid UTF-8 as the last characterMark Longair2013-06-03-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge remote-tracking branch ↵Louise Crow2013-06-04-86/+163
|\ \ \ \ | | | | | | | | | | | | | | | 'openaustralia_github/more_info_on_report_request' into rails-3-develop
| * | | | User needs to choose a reasonMatthew Landauer2013-03-22-5/+15
| | | | |
| * | | | Reasons that request can be reported now stored in modelMatthew Landauer2013-03-22-1/+1
| | | | |
| * | | | Rename parameter used in routes and controllerMatthew Landauer2013-03-22-9/+9
| | | | |
| * | | | Rename controller actionsMatthew Landauer2013-03-22-12/+12
| | | | |
| * | | | Move reporting actions to their own controllerMatthew Landauer2013-03-22-119/+125
| | | | |
| * | | | Extract methodMatthew Landauer2013-03-22-1/+1
| | | | |
| * | | | Only allow posts for reporting request. Don't try redirection when not logged inMatthew Landauer2013-03-22-3/+4
| | | | |
| * | | | Posted reason and message gets sent out in the emailMatthew Landauer2013-03-22-0/+7
| | | | |
| * | | | Let the user know when the request has already been reportedMatthew Landauer2013-03-22-0/+29
| | | | |
| * | | | Only allow reporting a request when logged inMatthew Landauer2013-03-22-0/+24
| | | | |
* | | | | Merge remote-tracking branch ↵Louise Crow2013-06-04-55/+62
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 'openaustralia_github/inline_search_method_refactor' into rails-3-develop
| * | | | | Inline method InfoRequest.full_searchMatthew Landauer2013-03-25-55/+62
| |/ / / /
* | | | | Merge remote-tracking branch ↵Louise Crow2013-06-04-0/+26
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 'openaustralia_github/fix_search_highlight_non_ascii_characters' into rails-3-develop
| * | | | | Fix word highlighting in acts_as_xapian for non-ascii characters. Fixes #505Matthew Landauer2013-03-25-0/+26
| |/ / / /
* | | | | Merge branch 'feature/new-string-for-translation' into rails-3-developLouise Crow2013-05-30-1/+18
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Allow the default text of an internal review request to be translated.Louise Crow2013-05-07-1/+18
| | | | |
* | | | | Make sure Atom feeds are served with content type application/atom+xmlMark Longair2013-05-29-0/+1
| | | | | | | | | | | | | | | | | | | | Fixes #961
* | | | | When extracting attachments for an incoming message and getting the body of ↵Louise Crow2013-05-29-0/+43
| | | | | | | | | | | | | | | | | | | | the main part in order to look for uuencoded text, make sure that we're getting that main part from the reparsed attachments, and not getting an obsolete attachment. Fixes #958.
* | | | | Remove erroneous test nameLouise Crow2013-05-28-1/+1
| | | | |
* | | | | Add a comment about the behaviour of the censor rulesMark Longair2013-05-24-0/+2
| | | | |
* | | | | The file_name on getting an attachment should be the display filenameMark Longair2013-05-24-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Previously the behaviour would have been the same, since we weren't checking the filename so strictly.
* | | | | Make an attachment filename in test fixtures more difficultMark Longair2013-05-24-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Check that display_filename matches URL part number or fallbackMark Longair2013-05-24-15/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the display_filename of the attachment found from the URL part number doesn't match the passed in display_filename then the email may have been reparsed, causing a reordering. In that case, look to see if there is another attachment that uniquely matches that filename, and, if so, return that other attachment. If no matching uniquely matching filename is found, redirect to the incoming message, rather than returning a 404.
* | | | | Retain old handling of malformed addresses in To and Cc linesMark Longair2013-05-21-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Cope with emails with a missing final MIME boundaryMark Longair2013-05-17-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Mail gem deals with multipart messages that look as if they should have 1 part but are missing the final MIME boundary, by make the parts list empty and setting part.body to the text of the email. Rather than throwing an exception in this case, we just pretend that part is text/plain and return it, so that the page doesn't error and we still have a chance of some useful text being displayed. Note that we haven't investigated yet the case of emails that have more than one start boundary, but no final boundary. Fixes #921
* | | | | Avoid an FoiAttachment validation failure under Rails 3Mark Longair2013-05-16-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+44
| | | | | | | | | | | | | | | | | | | | no charset field.
* | | | | Mark as "pending" two tests relating to odd MIME boundary casesMark Longair2013-05-16-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These cases are rare, and probably need to be resolved by reporting issues against the Mail gem (although it's debatable what the more correct or pragmatic behaviour should be in both cases).
* | | | | Add another mail parsing testMark Longair2013-05-16-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | At one point in development this email was misparsed, so I've added this as test to check for regressions.