aboutsummaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeLines
* Split factories in to individual filesGareth Rees2014-03-25-193/+227
| | | | | | | | | | | | Factories are loaded automatically from: - test/factories.rb - spec/factories.rb - test/factories/*.rb - spec/factories/*.rb Keeping factories per-model helps navigation, especially when they get more complex with traits and inheritance.
* Add AdminHelper#comment_visibilityGareth Rees2014-03-25-0/+21
| | | | Get the canonical human-readable status of a comment
* Add specs for AdminUserController#modify_comment_visibilityGareth Rees2014-03-25-0/+86
|
* Merge branch 'feature/1313-better-translation-markup' into rails-3-developLouise Crow2014-03-24-6/+54
|\
| * Refactor event description to make it easier to translate.Louise Crow2014-03-17-6/+54
| | | | | | | | Closes #1313 and #365.
* | Add encoding lineLouise Crow2014-03-14-0/+1
| |
* | Rename spec files so they're run by rake spec.Louise Crow2014-03-13-0/+0
| |
* | Merge remote-tracking branch ↵Louise Crow2014-03-13-10/+10
|\ \ | | | | | | | | | 'opennewzealand_github/feature/handle-undefined-conversion' into rails-3-develop
| * | needs _spec.rb to be run by `rake spec`Rowan Crawford2014-03-01-0/+0
| | |
| * | Fix tests for basic encodingRowan Crawford2014-03-01-10/+10
| | |
* | | 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.
* | | Add formatting options to LinkToHelper#simple_dateGareth Rees2014-03-13-2/+38
| |/ |/|
* | Make test specific to versions of ruby with String.encodeLouise Crow2014-02-24-4/+6
| | | | | | | | The code being tested is specific in that way.
* | Merge remote-tracking branch ↵Louise Crow2014-02-24-1/+7
|\ \ | | | | | | | | | 'opennewzealand_github/feature/encode-utf8-messages' into rails-3-develop
| * | Add test for _get_attachment_text_internal with invalid utf-8Rowan Crawford2014-02-23-1/+7
| |/
* | Merge branch 'feature/batch-requests' into rails-3-developLouise Crow2014-01-29-38/+661
|\ \ | | | | | | | | | | | | | | | Conflicts: config/general.yml-example spec/factories.rb
| * | 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.