aboutsummaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeLines
* Specify sort on results to return in consistent order.Louise Crow2014-01-28-1/+1
|
* Send batch requests as a cron job.Louise Crow2013-12-04-0/+40
|
* Add a mailer method for sending a batch request notificationLouise Crow2013-12-04-0/+35
|
* 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
|
* Simplify return value, set sent_at in create_batch!Louise Crow2013-12-04-13/+34
|
* 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
|
* Use public bodies not requests in find_existingLouise Crow2013-12-04-6/+8
| | | | The requests may not have been created at this point.
* Split the creation of a batch and the associated requests.Louise Crow2013-12-04-10/+9
| | | | We're going to want to actually create and send the requests later.
* Javascript enhancements.Louise Crow2013-12-04-27/+59
| | | | Add or remove all buttons, ajax search as you type.
* Add the specific salutations to each request.Louise Crow2013-12-04-0/+22
| | | | | | Also, wrap model creation in a transaction and do the message sending separately - we may ultimately want to do this outside the request cycle.
* 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/+57
|
* Make method names for finding existing objects clearerLouise Crow2013-12-04-2/+2
| | | | | 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
|
* Add InfoRequestBatch model.Louise Crow2013-12-04-0/+25
| | | | | Re-annotate models. Index InfoRequestBatches by user - we'll display the batches for a user when they view their own requests.
* 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
|
* Batch users don't have a daily limit.Louise Crow2013-12-04-0/+7
| | | | | | | It doesn't make logical sense that they would. However I am preserving the ability to make batch requests as a separate thing from not having a daily limit - I think batch sending requires a (perhaps marginally) bigger level of trust.
* Add some specs for existing exceeded_limit? behaviourLouise Crow2013-12-04-0/+24
|
* 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.
* Create a placeholder salutation for a batch request template.Louise Crow2013-12-04-2/+12
|
* Handle the application of censor rules to a batch request template.Louise Crow2013-12-04-0/+6
|
* Add a batch_request_template flagLouise Crow2013-12-04-0/+13
| | | | | | A virtual attribute to use to customise some info request behaviours when we are using one request as a template for creating multiple requests.
* 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/+22
| | | | Make it updatable via the user admin page.
* Merge branch 'move-plugins-out-of-vendor-plugins' into rails-3-developMark Longair2013-12-03-1/+5
|\
| * Move themes from vendor/plugins to lib/themesMark Longair2013-12-03-0/+1
| | | | | | | | | | | | | | | | | | | | These are essentially required in exactly the same way as before, but from lib/themes rather than vendor/plugins. This is the simplest possible change in order make the themes work outside vendor/plugins, I think, but it's not necessarily ideal. It would be worth considering whether these should be changed to Rails engines, as described here: http://guides.rubyonrails.org/engines.html
| * Move acts_as_xapian out of vendor/pluginsMark Longair2013-11-29-1/+2
| | | | | | | | | | This includes making making sure that xapiandbs directory is moved with this version of the code.
| * Move has_tag_string out of vendor/pluginsMark Longair2013-11-29-0/+1
| |
| * Move strip_attributes out of vendor/pluginsMark Longair2013-11-29-0/+1
| |
* | 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.
* | Merge remote-tracking branch 'origin/merged-rails-3-2-assset-pipeline' into ↵Louise Crow2013-11-29-90/+2
|\| | | | | | | | | | | | | rails-3-develop Conflicts: Gemfile.lock
| * Merge branch 'feature/rails-3-2-upgrade-spike' into ↵Mark Longair2013-11-29-90/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | feature/switch-to-asset-pipeline Conflicts: Gemfile.lock app/assets/images/admin-theme/ui-bg_flat_0_aaaaaa_40x100.png app/assets/images/admin-theme/ui-bg_flat_55_fbf9ee_40x100.png app/assets/images/admin-theme/ui-bg_flat_65_ffffff_40x100.png app/assets/images/admin-theme/ui-bg_flat_75_cccccc_40x100.png app/assets/images/admin-theme/ui-bg_flat_75_dadada_40x100.png app/assets/images/admin-theme/ui-bg_flat_75_e6e6e6_40x100.png app/assets/images/admin-theme/ui-bg_flat_75_ffffff_40x100.png app/assets/images/admin-theme/ui-bg_inset-soft_95_fef1ec_1x100.png app/assets/images/admin-theme/ui-icons_222222_256x240.png app/assets/images/admin-theme/ui-icons_2e83ff_256x240.png app/assets/images/admin-theme/ui-icons_454545_256x240.png app/assets/images/admin-theme/ui-icons_888888_256x240.png app/assets/images/admin-theme/ui-icons_cd0a0a_256x240.png app/assets/javascripts/admin.js app/assets/javascripts/admin/jquery-ui.min.js app/assets/javascripts/application.js app/assets/javascripts/jquery-ui.min.js app/assets/javascripts/jquery.flot.errorbars.min.js app/assets/javascripts/jquery.flot.min.js app/assets/javascripts/stats.js app/assets/stylesheets/application.css app/assets/stylesheets/fonts.scss app/views/general/_stylesheet_includes.html.erb app/views/layouts/admin.html.erb app/views/layouts/default.html.erb app/views/public_body/statistics.html.erb config/application.rb config/environments/development.rb
| | * Update spec to match upgraded mail gem behaviour.Louise Crow2013-11-12-1/+1
| | | | | | | | | | | | | | | The new name value doesn't escape a double quote within single quotes, which seems more correct.
| | * Remove obsolete test.Louise Crow2013-11-12-88/+0
| | |
| | * Mock methods need to call mail() to generate a proper mail.Louise Crow2013-11-12-1/+1
| | |
* | | Move getting recent requests into a helper method.Louise Crow2013-11-25-42/+37
| | |
* | | Move getting similar requests to the InfoRequest model.Louise Crow2013-11-25-2/+19
|/ /
* | 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
| | |