aboutsummaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeLines
* Save cached columns once updated.Louise Crow2013-09-05-2/+7
|
* Don't dirty every attribute in checking for whitespace.Louise Crow2013-09-05-15/+31
| | | | | | | Check to see if the stripped version is different before setting it on the record. If we don't do this, the subsequent call to write_attribute in Globalize3 which uses attribute_will_change! means we're storing versions when there hasn't really been any change.
* Add a config option to enable the public body statistics pageMark Longair2013-08-20-0/+1
|
* Improve calculation of PublicBody statistics columnsMark Longair2013-08-20-1/+67
| | | | | | | | | | | | | | | | 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.
* Add a test for the PublicBodyController statistics actionMark Longair2013-08-20-0/+52
|
* Add a page with experimental statistics on public bodiesMark Longair2013-08-20-0/+30
| | | | | | | | | | | | | | | | | The statistics on the status of the requests to a particular public body are too slow to calculate on-the-fly, so this commit adds: * Extra columns on public_bodies to store counts of the successful, not held, and overdue request counts for each public body. * A rake task which should be run periodically to update the overdue request count column. If Javascript is not available, the summary statistics are shown as tables. If Javascript is available, graphs are drawn with Flot.
* Merge branch 'feature/further-request-event-fixes' into rails-3-developLouise Crow2013-08-15-3/+53
|\
| * Set the calculated state on external requests.Louise Crow2013-08-15-0/+3
| | | | | | | | Set to 'waiting_response' on creation, to match the displayed state.
| * 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
* | Try to convert csv files of public bodies into utf-8 before importing them.Louise Crow2013-08-14-0/+1
| |
* | Update tests for changes to fixture file.Louise Crow2013-08-14-14/+18
|/
* Handle the case of a name that hits the character limits and has been ↵Louise Crow2013-07-29-5/+25
| | | | suffixed with a number.
* Merge branch 'feature/localisation-fixes' into rails-3-developLouise Crow2013-07-29-148/+143
|\
| * Prepare the xapian database before running tests that rely on it existing.Louise Crow2013-07-29-0/+5
| |
| * Move some more config into AlaveteliLocalization so that it can be called ↵Louise Crow2013-07-24-10/+4
| | | | | | | | outside initialization e.g. in tests.
| * Patch Globalize to compensate for the way gettext_i18n_rails patches ↵Louise Crow2013-07-23-0/+32
| | | | | | | | 118n.locale in the handling of locales with underscores. Fixes #999.
| * Add loading of raw emails - test depends on this.Louise Crow2013-07-23-0/+1
| |
| * Use AlaveteliConfiguration wrapper in test so we can be more specific about ↵Louise Crow2013-07-23-1/+1
| | | | | | | | the method to be stubbed and avoid side effects.
| * Extract code for setting locales in FastGettext and I18nLouise Crow2013-07-18-11/+5
| |
| * Switch routing-filter (which takes locale out of the params and puts it in ↵Louise Crow2013-07-18-144/+113
| | | | | | | | the URL) off by default in model, controller, and helper tests. This means we can supply the locale as a param. Turn it on specifically for a couple of controller tests that test routing, and change other url localization tests into integration tests.
* | Merge branch 'hotfix/0.12.0.1' into rails-3-developLouise Crow2013-07-29-0/+7
|\ \ | | | | | | | | | | | | | | | Conflicts: locale/he_IL/app.po locale/nb_NO/app.po
| * | Backport https://github.com/mikel/mail/pull/405 to prevent stack overflow ↵0.12.0.1hotfix/0.12.0.1Louise Crow2013-07-26-0/+7
| | | | | | | | | | | | errors when parsing large mails with envelopes on memory limited systems.
* | | Prevent erroneous internal error messages with multibyte characters under ↵Louise Crow2013-07-25-1/+12
| | | | | | | | | | | | ruby 1.8 by using mb_chars for length comparison - it counts multibyte characters.
* | | Merge remote-tracking branch ↵Louise Crow2013-07-23-5/+209
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | 'openaustralia_github/tests_set_described_state' into rails-3-develop Conflicts: spec/models/info_request_spec.rb
| * | Now record a state_update event *whenever* a user classifies a requestMatthew Landauer2013-04-20-5/+6
| | |
| * | 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 'release/0.12' into rails-3-developLouise Crow2013-06-26-6/+0
|\ \ \ | | |/ | |/|
| * | Revert "Assume that format will be specified in the url requested, or ↵Louise Crow2013-06-26-6/+0
| | | | | | | | | | | | | | | | | | default to HTML. Fixes #989." This reverts commit c1b3324922687778b316ee1a180582013bcf6d0e.
* | | Add test case and fix for unrecognized encoding in subject lineLouise Crow2013-06-25-0/+41
|/ /
* | Don't call out to external urls during controller testsLouise Crow2013-06-20-0/+12
| |
* | Use request.params to generate a json format url when @has_json is true, not ↵Louise Crow2013-06-20-0/+7
| | | | | | | | request.query_parameters. The latter has unexpected results when a querystring parameter of 'action' or 'controller' is supplied. Fixes #981.
* | Assume that format will be specified in the url requested, or default to ↵Louise Crow2013-06-20-0/+6
| | | | | | | | HTML. Fixes #989.
* | Respond to a (currently unsupported) json request for a public body list ↵Louise Crow2013-06-20-1/+4
| | | | | | | | with a 406, not a 500 caused by a missing template.
* | Merge branch 'hotfix/0.11.0.14' into rails-3-developLouise Crow2013-06-19-0/+10
|\ \
| * | Allow the HTML display of the body of an email to handle the case where the ↵0.11.0.14hotfix/0.11.0.14Louise Crow2013-06-19-0/+10
| | | | | | | | | | | | body is only quoted text and there is no subject.
* | | Merge branch 'hotfix/0.11.0.13' into rails-3-developLouise Crow2013-06-17-3/+28
|\| | | | | | | | | | | | | | Conflicts: spec/mailers/outgoing_mailer_spec.rb
| * | Explicitly set I18n.locale in set_gettext_locale in order to get Rails to ↵0.11.0.13hotfix/0.11.0.13Louise Crow2013-06-17-2/+27
| | | | | | | | | | | | expire the template cache and trigger a lookup.
| * | Fix a security vulnerability: eval used in quoting display name0.11.0.12Mark Longair2013-06-17-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This use of eval allows arbitrary remote code execution on parsing of a maliciously formed email. Two tests are updated to match the behaviour of the new code to return the display name - these introduce extra escaping, so should be innocous.