aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
Commit message (Collapse)AuthorAgeLines
* Merge branch '2051-back-to-search' into rails-3-developGareth Rees2015-01-13-0/+14
|\
| * Add a “Back to search results” linkGareth Rees2015-01-13-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store the search parameters in the flash when a search is made via the select_authority_path page. Stores the parameters for both POST and AJAX typeahead searches. The presence of stored search params renders the link on the PublicBodyController#show template. “keep”s the search params in PublicBodyController#show so that if the user clicks the browser’s back button the “Back to search results” link can still be rendered on the next search result they click. “keep”s all flash keys in ServicesController#other_country_message as it’s called through AJAX and ends up sweeping the flash. [1] [1] More details about this: http://mikenaberezny.com/2007/09/08/keep-the-flash-and-test-it-too/
* | Use a partial to render batch sent messageGareth Rees2015-01-13-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dropped the law_used_full interpolation: So I think there are two significant bits of context here. One is that the law_used_full attribute is derived from law_used, which in turn is set on InfoRequest initialisation based on the tags applied to the public body. So different requests in a batch could have different values for law_used_full - some of them might be to bodies that only accept environmental information requests. So using the value from the batch template is not really a good proxy for the whole collection. The second is that, in any case, the distinction between the two types of request is a UK-specific feature which should be moved to the UK theme (#2085). Given these two factors, I think the cleanest thing might be to drop law_used_full from this descriptive text, and just have it say "Your requests will be sent shortly", without specifying what law will be used. – Louise Crow (@crowbot)
* | Use a partial to render request sent messageGareth Rees2015-01-13-0/+10
|/
* Merge branch 'hotfix/0.20.0.2' into rails-3-developLouise Crow2015-01-07-0/+12
|\
| * Sanitize the contents of HTML attachments before displayLouise Crow2014-12-22-0/+12
| |
* | Remove focus tagLouise Crow2014-12-23-1/+1
| |
* | Refactor the application of masks and censor rules to messages.Louise Crow2014-12-15-1/+1
| | | | | | | | | | | | | | | | | | | | Seems more logical to make this one method that figures out what to do based on file type. Plus, incoming message does so many things, it seemed like having these related methods be separate would make them easier to read and understand. Also, email, mobile and login substitution texts weren't being translated. Finally, I think passing the censor rules and masks as arguments is a first step in some more decoupling of models.
* | RequestController#search_typaahead limit resultsGareth Rees2014-11-11-0/+11
| | | | | | | | Use the per_page parameter to limit the results returned
* | RequestController#search_typeahead filter by bodyGareth Rees2014-11-11-0/+6
|/ | | | | Action now supports the `request_from` param as per the Xapian filtering system to filter search typeaheads by public body
* Extract initial and followup sending from modelGareth Rees2014-10-17-2/+18
|
* Use regex based highlightingGareth Rees2014-06-25-1/+0
|
* Rename XXX comments with TODO:Gareth Rees2014-06-10-12/+12
| | | | Picks these up in `rake notes` and adds semantic meaning
* Redirect to the frontpage rather than error on invalid paramsLouise Crow2014-06-02-0/+11
| | | | Fixes #1448.
* Use AttachmentToHTML to generate FoiAttachment#body_as_htmlGareth Rees2014-03-28-2/+1
|
* Merge branch 'feature/batch-requests' into rails-3-developLouise Crow2014-01-29-2/+267
|\ | | | | | | | | | | Conflicts: config/general.yml-example spec/factories.rb
| * Update notices for offline sending.Louise Crow2013-12-04-9/+1
| |
| * Javascript enhancements.Louise Crow2013-12-04-27/+59
| | | | | | | | Add or remove all buttons, ajax search as you type.
| * Notices for success and errors.Louise Crow2013-12-04-16/+34
| |
| * Add check for double submission.Louise Crow2013-12-04-0/+11
| |
| * Simple code for the happy pathLouise Crow2013-12-04-0/+8
| | | | | | | | | | Create the batch and associate new requests with it, send the outgoing messages, and redirect to a page for the new batch.
| * Use two bodies in specs.Louise Crow2013-12-04-3/+5
| |
| * Handle a banned user making batch requests.Louise Crow2013-12-04-0/+15
| |
| * Factor out common params for clarity.Louise Crow2013-12-04-18/+11
| |
| * Require at least one public body in the params.Louise Crow2013-12-04-2/+10
| |
| * Create template and outgoing messageLouise Crow2013-12-04-0/+29
| | | | | | | | | | Add validation, preview as in single request creation. Add comments noting further work to be done in this action.
| * Add new_batch actionLouise Crow2013-12-04-0/+66
| | | | | | | | | | | | Give it basic access control, and add some conditionals to the 'new' template around bits that use @info_request.public_body so that they render something different if @batch is assigned.
| * Add template for select_authoritiesLouise Crow2013-12-04-2/+32
| | | | | | | | Should retain a list of selected public bodies across searches.
| * Handle not enabled, no user, unauthorised user.Louise Crow2013-12-04-3/+55
| |
| * Add a select_authorities action.Louise Crow2013-12-04-0/+9
| |
* | Cache frequently accessed request lists.Louise Crow2013-12-19-86/+0
|/ | | | Make specs a bit more focused, remove view specs - they're not relevant to the new code in their current form and don't seem to merit updating.
* Remove extra "is invalid" message.Louise Crow2013-09-18-0/+8
| | | | Fixes #1101.
* Merge branch 'feature/hide-individual-responses' into rails-3-developLouise Crow2013-09-17-173/+201
|\ | | | | | | | | | | | | | | | | | | | | 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 403, not 410, for hidden items.Louise Crow2013-09-16-4/+4
| | | | | | | | | | As @mhl points out, this more clearly indicates that they may come back at some point.
| * Use earlier factory_girl syntaxLouise Crow2013-09-16-4/+6
| |
| * Add public criteria for message event access methodsLouise Crow2013-09-16-7/+7
| | | | | | | | | | | | | | get_last_response_event and get_last_outgoing_event are used in various places to determine which events to link to, use in queries etc. Restrict them to refer to the last publicly visible event of the relevant type, and rename them to make that clear.
| * Restore the download for hidden requestsLouise Crow2013-09-16-6/+0
| | | | | | | | | | | | This was disabled for hidden requests as the download was by redirect, allowing people who have not been authenticated to conceivably access the download. We'll be moving to send_file instead, so can restore it.
| * Rewrite download specLouise Crow2013-09-16-45/+3
| | | | | | | | | | Make it an integration spec so we don't need to touch the internals so much.
| * Replace fixture-based spec with factory-based equivalent.Louise Crow2013-09-16-10/+6
| |
| * Use expectation for hidden responses more generally.Louise Crow2013-09-16-9/+9
| |
| * Fix request in spec for hidden attachments not being viewed.Louise Crow2013-09-16-2/+15
| | | | | | | | | | Add another spec for the same behaviour when an incoming message is hidden.
| * Add new code and specs for hiding attachments.Louise Crow2013-09-16-1/+106
| |
| * Refactor expectation into a methodLouise Crow2013-09-16-6/+8
| | | | | | | | Remove expectation of pdf contents - we're looking at the raw file.
| * Refactor prominence specs to use factories not fixtures.Louise Crow2013-09-16-116/+74
| |
| * Clarify specs.Louise Crow2013-09-16-5/+5
| | | | | | | | They refer to the case where the request itself is hidden.
* | Save cached columns once updated.Louise Crow2013-09-05-1/+1
|/
* Merge branch 'feature/localisation-fixes' into rails-3-developLouise Crow2013-07-29-4/+0
|\
| * Switch routing-filter (which takes locale out of the params and puts it in ↵Louise Crow2013-07-18-4/+0
| | | | | | | | the URL) off by default in model, controller, and helper tests. This means we can supply the locale as a param. Turn it on specifically for a couple of controller tests that test routing, and change other url localization tests into integration tests.
* | Merge remote-tracking branch ↵Louise Crow2013-07-23-5/+6
|\ \ | |/ |/| | | | | | | | | 'openaustralia_github/tests_set_described_state' into rails-3-develop Conflicts: spec/models/info_request_spec.rb
| * Now record a state_update event *whenever* a user classifies a requestMatthew Landauer2013-04-20-5/+6
| |