aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/info_request_spec.rb
Commit message (Collapse)AuthorAgeLines
* Add required setupLouise Crow2015-05-28-0/+1
|
* Only mark email_subject_request as HTML safe when used in email subject.Louise Crow2014-12-12-1/+1
| | | | It's also used in the web interface and needs to be escaped there.
* Remove now-unused OutgoingMessage#send_messageGareth Rees2014-10-17-4/+7
| | | | Models should not send emails
* Return a list of all cache directories for the requestLouise Crow2014-09-01-2/+7
|
* Move method to model to make it more testable, add spec.Louise Crow2014-09-01-0/+12
|
* Annotate modelsGareth Rees2014-04-09-0/+1
| | | | | Should have been run after related migrations. Could automate this to always run after migrations.
* Merge branch 'feature/batch-requests' into rails-3-developLouise Crow2014-01-29-0/+19
|\ | | | | | | | | | | Conflicts: config/general.yml-example spec/factories.rb
| * 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.
* | Cache frequently accessed request lists.Louise Crow2013-12-19-0/+96
|/ | | | 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.
* Move getting recent requests into a helper method.Louise Crow2013-11-25-0/+37
|
* Move getting similar requests to the InfoRequest model.Louise Crow2013-11-25-2/+19
|
* Move special case to whatdotheyknow-themeLouise Crow2013-10-04-0/+10
| | | | | Apart from anything else, we don't want translators to have to worry about the special case text. See https://github.com/mysociety/whatdotheyknow-theme/commit/2078febca5181ce3b1a9c0fae0123ae5f6448718 for the corresponding change to whatdotheyknow-theme.
* Merge branch 'hotfix/0.13.0.3' into rails-3-developLouise Crow2013-09-18-0/+37
|\
| * Restrict old_unclassified methods to normal prominence.0.13.0.3hotfix/0.13.0.3Louise Crow2013-09-18-0/+37
| | | | | | | | Fixes #1082.
* | Merge branch 'feature/hide-individual-responses' into rails-3-developLouise Crow2013-09-17-9/+135
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Exclude hidden responses when calculating old_unclassifiedLouise Crow2013-09-16-7/+13
| | | | | | | | | | | | | | | Make old_unclassified_params method consistent with last_public_response_event and associated methods.
| * | Only include public messages in who_can_followup_toLouise Crow2013-09-16-0/+37
| | |
| * | Add public criteria for message event access methodsLouise Crow2013-09-16-2/+61
| | | | | | | | | | | | | | | | | | | | | 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.
| * | Re-annotate models with database fieldsLouise Crow2013-09-16-0/+24
| | |
* | | Allow a unicode-only title in validationLouise Crow2013-09-17-0/+22
| | |
* | | Save cached columns once updated.Louise Crow2013-09-05-1/+6
| | |
* | | Improve calculation of PublicBody statistics columnsMark Longair2013-08-20-0/+66
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | On PublicBody, we don't need to update info_requests_count because that's already done with :counter_cache. On the other hand, info_requests_successful_count and info_requests_not_held_count can't be updated easily with counter_cache (since they need conditions to be attached). Instead we update them in post_save and post_destroy, as suggested here: http://blog.douglasfshearer.com/post/17495285851/custom-counter-cache-with-conditions This also adds tests to ensure that the after_(save|destroy) callbacks are called and that they modify the counts correctly.
* | Make admin edits affect info_request_event described_states.Louise Crow2013-08-15-0/+21
| | | | | | | | | | | | | | Make sure that admin edits changing the described state of an info request are reflected in the latest_status and status values of info request events so that the info requests are retrieved correctly in status-based searches.
* | Allow 'edit' and 'status_update' calculated states to propagate.Louise Crow2013-08-15-3/+29
|/ | | | | | | | Update test expectations and add further test to explicitly show that we want the described status from a status update to be propagated to a preceding response, as well as being filled in in the status update itself (which is mostly to deal with the case where there isn't a preceding response). Make those changes to calculate_event_states
* Merge branch 'feature/localisation-fixes' into rails-3-developLouise Crow2013-07-29-0/+1
|\
| * Add loading of raw emails - test depends on this.Louise Crow2013-07-23-0/+1
| |
* | Merge remote-tracking branch ↵Louise Crow2013-07-23-0/+203
|\ \ | |/ |/| | | | | | | | | 'openaustralia_github/tests_set_described_state' into rails-3-develop Conflicts: spec/models/info_request_spec.rb
| * How we would handle event states if we added a state_update event whenever a ↵Matthew Landauer2013-04-20-17/+41
| | | | | | | | user classifies a request
| * Access events in tests as an arrayMatthew Landauer2013-04-20-42/+43
| |
| * Test case that shows up event states bug in ↵Matthew Landauer2013-04-18-1/+18
| | | | | | | | https://www.whatdotheyknow.com/details/request/family_support_worker_redundanci
| * Test case that shows up event states bug in ↵Matthew Landauer2013-04-18-0/+20
| | | | | | | | https://www.whatdotheyknow.com/request/human_rights_and_deprivation_of
| * Testing an internal reviewMatthew Landauer2013-04-18-109/+131
| |
| * Add test for events in another situationMatthew Landauer2013-04-15-0/+28
| |
| * Check event_type in testsMatthew Landauer2013-04-15-0/+7
| |
| * Test event states when follow up message is sentMatthew Landauer2013-04-15-0/+24
| |
| * Added a commentMatthew Landauer2013-04-15-0/+2
| |
| * Test events some moreMatthew Landauer2013-04-15-5/+22
| |
| * Test event status after a response is receivedMatthew Landauer2013-04-15-12/+39
| |
| * Test to check event states after initial request is sentMatthew Landauer2013-04-15-0/+14
| |
* | Merge branch 'hotfix/0.11.0.7' into rails-3-developLouise Crow2013-06-10-24/+36
|\ \ | | | | | | | | | | | | Conflicts: spec/models/info_request_spec.rb
| * | Cope with replying to a message with a missing or empty SubjectMark Longair2013-06-07-0/+12
| |/ | | | | | | | | | | Conflicts: spec/models/info_request_spec.rb
* / Handle request for json for an external request. Closes #973.Louise Crow2013-06-07-0/+29
|/
* Merge remote-tracking branch 'mysociety/develop' into rails-3-developHenare Degan2013-03-14-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock app/controllers/admin_request_controller.rb app/controllers/admin_track_controller.rb app/controllers/request_controller.rb app/controllers/services_controller.rb app/helpers/link_to_helper.rb app/mailers/request_mailer.rb app/models/application_mailer.rb app/models/info_request.rb app/views/admin_censor_rule/edit.html.erb app/views/admin_censor_rule/new.html.erb app/views/admin_public_body/_form.html.erb app/views/admin_public_body/_locale_selector.html.erb app/views/admin_public_body/_one_list.html.erb app/views/admin_public_body/edit.html.erb app/views/admin_public_body/list.html.erb app/views/admin_public_body/new.html.erb app/views/admin_request/_incoming_message_actions.html.erb app/views/admin_request/edit.html.erb app/views/admin_request/edit_comment.html.erb app/views/admin_request/edit_outgoing.html.erb app/views/admin_request/list.html.erb app/views/admin_request/list_old_unclassified.html.erb app/views/admin_request/show.html.erb app/views/admin_track/_some_tracks.html.erb app/views/admin_track/list.html.erb app/views/admin_user/edit.html.erb app/views/admin_user/list.html.erb app/views/admin_user/show.html.erb app/views/general/_footer.html.erb app/views/general/exception_caught.html.erb app/views/help/contact.html.erb app/views/layouts/default.html.erb app/views/public_body/_alphabet.html.erb app/views/request/_request_listing_single.html.erb app/views/request/_sidebar.html.erb app/views/request/new.html.erb app/views/request/show.html.erb app/views/request_mailer/external_response.rhtml app/views/request_mailer/fake_response.rhtml config/environment.rb config/environments/production.rb config/routes.rb spec/controllers/admin_censor_rule_controller_spec.rb spec/controllers/request_controller_spec.rb spec/controllers/track_controller_spec.rb spec/helpers/link_to_helper_spec.rb spec/mailers/request_mailer_spec.rb spec/models/info_request_spec.rb spec/spec_helper.rb spec/views/public_body/show.html.erb_spec.rb spec/views/request/show.html.erb_spec.rb vendor/plugins/rails_xss/lib/rails_xss/erubis.rb
| * InfoRequestEvent should know about its event typesMatthew Landauer2013-03-02-2/+2
| |
* | safe_mock_model doesn't seem to be needed, also tested in Ruby 1.9Henare Degan2012-12-12-8/+8
|/
* Standardize slug generation for external users so that it uses the same ↵Louise Crow2012-11-29-0/+16
| | | | underlying method as other slug generation. Fixes #567.
* use safe_mock_modelJames McKinney2012-11-01-6/+6
|
* Allow InfoRequest.find_old_unclassified to accept an offset param so it can ↵Louise Crow2012-09-13-0/+8
| | | | be used in conjunction with pagination.
* Add some more efficient methods for getting old unclassified request counts, ↵Louise Crow2012-09-11-11/+40
| | | | and random sets of small numbers of old unclassified requests.