aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers
Commit message (Collapse)AuthorAgeLines
* Add specs for AdminUserController#modify_comment_visibilityGareth Rees2014-03-25-0/+69
|
* Use filter to reject if user is bannedGareth Rees2014-03-13-0/+13
| | | | | | | | | Extract checking whether a user is banned from making Comments on an InfoRequest to a filter in CommentController. Removes responsibility from the #new method. Adds a missing spec.
* Graceful failure of new_comment routeGareth Rees2014-03-13-9/+10
| | | | | | | | | | Fixes https://github.com/mysociety/alaveteli/issues/662 If /annotate/request/:url_title is accessed when comments are disabled an exception is incorrectly thrown. Conditionals should be used for control flow, so now the action redirects to the info_request path and displays a notice.
* Merge branch 'feature/batch-requests' into rails-3-developLouise Crow2014-01-29-35/+407
|\ | | | | | | | | | | Conflicts: config/general.yml-example spec/factories.rb
| * Specify sort on results to return in consistent order.Louise Crow2014-01-28-1/+1
| |
| * Show public body list when batch has not been sent.Louise Crow2013-12-04-8/+29
| |
| * Update notices for offline sending.Louise Crow2013-12-04-9/+1
| |
| * Display batch requests for user on 'my requests' pageLouise Crow2013-12-04-2/+4
| | | | | | | | This is the most rudimentary possible way to give them access to the batch request urls, pending #1239
| * Refactor specs to make adding batch changes easier.Louise Crow2013-12-04-30/+63
| |
| * Javascript enhancements.Louise Crow2013-12-04-27/+59
| | | | | | | | Add or remove all buttons, ajax search as you type.
| * Add a rudimentary view for an info request batch.Louise Crow2013-12-04-0/+32
| |
| * Notices for success and errors.Louise Crow2013-12-04-16/+34
| |
| * Add check for double submission.Louise Crow2013-12-04-0/+11
| |
| * Make method names for finding existing objects clearerLouise Crow2013-12-04-1/+1
| | | | | | | | | | They're not finding by the existing object, they're finding an existing object.
| * 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
| |
| * Add a can_make_batch_requests flag to user modelLouise Crow2013-12-04-2/+21
| | | | | | | | Make it updatable via the user admin page.
* | Merge branch 'hotfix/0.16.0.6' into rails-3-developLouise Crow2014-01-28-0/+12
|\ \
| * | Handle a request with no user in the show request function0.16.0.5hotfix/0.16.0.5Louise Crow2014-01-28-0/+12
| | |
* | | Merge branch 'feature/1176-automate-authority-contacts' into rails-3-developLouise Crow2014-01-28-166/+427
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: doc/CHANGES.md
| * | | Add admin urls to change request emailsLouise Crow2014-01-13-0/+4
| | | |
| * | | Add form for closing change request without actionLouise Crow2014-01-13-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | For cases where we don't want to make the change suggested. There doesn't seem to be any obvious default text to use in the response to the person who requested the change.
| * | | Populate admin public body forms based on a change request.Louise Crow2014-01-13-0/+106
| | | | | | | | | | | | | | | | | | | | Also add editable text for an email to be sent to the person requesting the change.
| * | | Reorganise specsLouise Crow2014-01-13-166/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to make it clearer where to add new specs, group specs by controller and action, merging specs relating to internationalisation with other specs as there seem to be no specific prerequisites in terms of set up for them, and removing some duplicate specs.
| * | | Form and models for asking for a public body change.Louise Crow2014-01-13-0/+95
| | | |
* | | | Merge branch 'feature/cache-request-lists' into rails-3-developLouise Crow2014-01-28-86/+0
|\ \ \ \
| * | | | 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.
* | / / Tighten up expectation, make expected files consistent.Louise Crow2014-01-17-12/+0
| |/ / |/| | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'feature/cleanup-popups' into release/0.16Louise Crow2014-01-14-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock app/views/layouts/default.html.erb config/application.rb public/admin/stylesheets/admin.css
| * | Cleanup popup notices.Louise Crow2014-01-14-1/+1
| |/ | | | | | | | | | | | | | | Move HTML to view from controller, use same elements for other country popup and everypage - partly so they don't display on top of each other anymore. Don't position them over existing content, position them at the top of the page. Use consistent styling, and keep the javascript unobtrusive.
* / Only show the blog if a BLOG_FEED is configured.Louise Crow2013-12-09-0/+11
|/
* Move getting recent requests into a helper method.Louise Crow2013-11-25-42/+0
|
* Merge branch 'all-authorities-reduce-memory' into rails-3-developMark Longair2013-11-19-0/+14
|\ | | | | | | | | This has already been cherry-picked into the wdtk branch, but it should also be merged into rails-3-develop
| * Reduce the memory used to serve /body/all-authorities.csvMark Longair2013-11-14-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On WDTK, /body/all-authorities was using lots of memory - this commit reduces that by (a) fetching the public bodies in batches, rather than keeping them all in memory at one time and (b) writing the CSV to a file and then returning it with X-Sendfile (or equivalent), rather than returning the whole file from memory with send_data. There's a FIXME to do with the layout of download directories; if that's changed, the example nginx config, etc. will need to be updated too. This commit also adds a basic test for reasonable CSV being returned and switches from FasterCSV to CSV in order to fix this NotImplementedError under Ruby 1.9: Please switch to Ruby 1.9's standard CSV library. It's FasterCSV plus support for Ruby 1.9's m17n encoding engine. (The CSV version seems to still work fine under 1.8.7.)
* | Fix construction of example public bodies for upstream globalizeMark Longair2013-11-19-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're trying to switch to an upstream version of globalize, which now has Henare's change to allowed blank values without them being converted to nil - however, there is another intermediate change that was introduced which means that the name is only written back to the original table if the locale matches the default locale. This is described in more depth here: https://github.com/globalize/globalize/pull/183 This change broke the make_single_language_example helper, but this commit fixes that by also setting the default locale before creating the example public bodies.
* | Refactor some tests to use with_default_localeMark Longair2013-11-19-17/+15
|/
* Merge branch 'feature/1118-fix-ask-us-to-add-links' into rails-3-developMark Longair2013-11-07-0/+16
|\
| * Show 'browse all' and 'ask us to add' one for authority only search.Louise Crow2013-11-07-0/+5
| | | | | | | | | | This is for the case where there are no results and the user was explicitly searching for authorities.
| * Show highlights and correction regardless of search type.Louise Crow2013-11-07-0/+11
| | | | | | | | Contributes to #1118.
* | Factor out code for generating graphable data and add testsMark Longair2013-11-05-0/+87
| | | | | | | | | | | | This simplifies the statistics action of the PublicBodyController and makes it easier to test the functionality now in the simplify_stats_for_graphs method.
* | Fix the indentation of a PublicBodyController testMark Longair2013-11-05-28/+28
|/
* Merge branch 'hotfix/0.14.0.3' into rails-3-developLouise Crow2013-10-24-0/+33
|\