aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/info_request_spec.rb
Commit message (Collapse)AuthorAgeLines
* 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.
* Merge branch 'release/0.6.3' into developLouise Crow2012-08-22-19/+81
|\ | | | | | | | | | | | | | | Conflicts: app/controllers/admin_public_body_controller.rb app/views/admin_public_body/import_csv.rhtml spec/controllers/admin_public_body_controller_spec.rb spec/models/info_request_spec.rb
| * Apply global and public body censor rules to binary files.Louise Crow2012-08-14-23/+60
| |
| * Add association between public bodies and censor rules, have info_request ↵Louise Crow2012-08-14-0/+8
| | | | | | | | apply rules from its public body.
| * Add concept of global censor rules as orthogonal to regex censor rules. ↵Louise Crow2012-08-14-117/+135
| | | | | | | | Apply global rules to every request, not regex rules.
* | Fix testsRobin Houston2012-08-20-3/+3
| | | | | | | | | | | | | | | | | | Also make the InfoRequest#is_old_unclassified? method a little more conservative, by returning false only is the is_external? method returns true. This makes it subtly inconsistent with InfoRequest.find_old_unclassified, but it is better I think to be subtly inconsistent than to risk breaking things that used to work.
* | Merge branch 'wdtk' into developLouise Crow2012-08-16-98/+127
|\ \ | |/ |/| | | | | | | | | Conflicts: app/controllers/admin_request_controller.rb config/httpd.conf spec/models/info_request_spec.rb
| * Add method all_can_view? which can be used to determine whether it is ok to ↵Louise Crow2012-08-16-99/+128
| | | | | | | | cache the associated objects for an info request in the file cache which will be served up without authentication.
* | Misc fixes to get tests to pass - notably a MonkeyPatch to work around ↵Seb Bacon2012-07-13-0/+1
| | | | | | | | problem testing template results
* | Support regular expressions in CensorRules; also support 'global' ↵Seb Bacon2012-07-13-1/+20
|/ | | | CensorRules that aren't attached to a User or Request or Public Body (but don't expose this in the admin UI). Fixes #33
* Load all fixtures for all testsRobin Houston2012-01-31-7/+0
| | | | | | | | | The ad hoc specification of fixtures has been an ongoing source of bugs in the tests. The straw that broke the camel’s back is that 7c6eb09 requires the fixtures to be loaded in order (i.e. children before their parents), and it would have been a painful process to reorder all the dozens of different fixture lists, but the test system ought to be more reliable this way.
* Load all raw emails for testingRobin Houston2012-01-29-1/+1
| | | | | | | | | | | Previously there was just one raw email, and the test code relied on that fact. Generalise it to handle multiple raw emails. This change causes a number of tests to fail, because it exposes failures that should have happened when the second raw email was added but were masked by the fact that the text of this second raw email was never loaded. These failures will be fixed in the next commit.
* Further improvements to attachment cachingSeb Bacon2011-12-13-1/+1
|
* Merge remote-tracking branch 'jpmckinney/pre1.9' into developSeb Bacon2011-11-24-2/+2
|\ | | | | | | | | Conflicts: spec/controllers/request_controller_spec.rb