aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers
Commit message (Collapse)AuthorAgeLines
...
| * Use expectation for hidden responses more generally.Louise Crow2013-09-16-9/+9
| |
| * Fix request in spec for hidden attachments not being viewed.Louise Crow2013-09-16-2/+15
| | | | | | | | | | Add another spec for the same behaviour when an incoming message is hidden.
| * Add new code and specs for hiding attachments.Louise Crow2013-09-16-1/+106
| |
| * Refactor expectation into a methodLouise Crow2013-09-16-6/+8
| | | | | | | | Remove expectation of pdf contents - we're looking at the raw file.
| * Refactor prominence specs to use factories not fixtures.Louise Crow2013-09-16-116/+74
| |
| * Clarify specs.Louise Crow2013-09-16-5/+5
| | | | | | | | They refer to the case where the request itself is hidden.
| * Add the meat of the update action.Louise Crow2013-09-16-0/+70
| |
| * Add a simple edit action and templateLouise Crow2013-09-16-5/+28
| |
| * Slightly nicer action names.Louise Crow2013-09-16-5/+5
| |
| * Move incoming message admin to its own controller.Louise Crow2013-09-16-74/+51
| | | | | | | | | | Make specs that depend on multiple controllers and models interacting integration specs.
| * Move outgoing message admin actions to their own controller.Louise Crow2013-09-16-12/+23
| | | | | | | | Eventually this should use standard RESTful routing.
* | Merge branch 'public-body-locale-fallback' into rails-3-developLouise Crow2013-09-12-8/+66
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: app/controllers/public_body_controller.rb config/general.yml-example lib/configuration.rb
| * | Don't display duplicate public bodies with the fallbackMark Longair2013-09-12-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces some raw SQL statement for the fallback case, but we can't see an easy way to avoid that in this case. This commit also adds some tests that assert the sorting and non-duplication properties of the listing. Thanks to Louise Crow for working out the SQL expression for falling back to the default locale.
| * | Factor out the code to generate example single language public bodiesMark Longair2013-09-10-16/+23
| | | | | | | | | | | | | | | It's useful to be able to generate example public bodies that only have translations in particular languages.
| * | Add tests to assert the new public body listing behaviourMark Longair2013-09-10-0/+14
| | | | | | | | | | | | | | | | | | These tests will fail unless we have the new behaviour for public body listing, which depend on the setting of PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE.
| * | Make falling back to default locale in public body listings optionalMark Longair2013-09-10-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the code stood, the list method in PublicBodyController would only return results that had translations of the public body in the default locale. This has a variety of problems if you're viewing pages in the non-default locale - for example, the "first letter" links wouldn't bring up the public bodies that began with that letter in the current locale, only those that began with it in the default locale. Ideally, every public body would be translated into every available locale for the site, but there are cases where deployers wish to have public body listings also include those from the default locale, in case there are untralsated public bodies: https://groups.google.com/d/msg/alaveteli-dev/zUY_USaAMAM/M7KTQ9RC5YUJ This commit makes the default behaviour to look for public body listings only in the current locale, but if the new configuration option PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE is set, then public body listings will be looked for in both the current locale and the default locale. Fixes #1000
* | | Save cached columns once updated.Louise Crow2013-09-05-1/+1
| | |
* | | 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/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+34
|/ /
* / Set the calculated state on external requests.Louise Crow2013-08-15-0/+3
|/ | | | Set to 'waiting_response' on creation, to match the displayed state.
* 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-138/+24
|\
| * Patch Globalize to compensate for the way gettext_i18n_rails patches ↵Louise Crow2013-07-23-0/+18
| | | | | | | | 118n.locale in the handling of locales with underscores. Fixes #999.
| * Switch routing-filter (which takes locale out of the params and puts it in ↵Louise Crow2013-07-18-139/+7
| | | | | | | | 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 remote-tracking branch ↵Louise Crow2013-07-23-5/+6
|\ \ | |/ |/| | | | | | | | | '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
| |
* | 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.
* | Don't call out to external urls during controller testsLouise Crow2013-06-20-0/+12
| |
* | 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.13' into rails-3-developLouise Crow2013-06-17-2/+25
|\ \ | | | | | | | | | | | | 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/+25
| | | | | | | | | | | | expire the template cache and trigger a lookup.
| * | We're assuming feed urls without format suffixes should serve up atom/xml, ↵0.11.0.4hotfix/0.11.0.4Louise Crow2013-06-05-0/+12
| | | | | | | | | | | | so ignore any format from content negotiation in favour of that default.
* | | Better spec isolation - these specs require raw emails, so make sure they're ↵Louise Crow2013-06-10-0/+1
| | | | | | | | | | | | loaded.
* | | Remove reference to incoming message from purge request test - it brings in ↵Louise Crow2013-06-07-1/+1
| | | | | | | | | | | | a requirement to have loaded the raw emails, which is tangential to what we're testing.
* | | Allow the donation url to be configured. Closes #909.Louise Crow2013-06-07-0/+28
| | |
* | | Add some context blocks to group together tests with the same status.Louise Crow2013-06-07-57/+103
| | |
* | | We're assuming feed urls without format suffixes should serve up atom/xml, ↵Louise Crow2013-06-05-0/+12
| | | | | | | | | | | | so ignore any format from content negotiation in favour of that default.
* | | Remove support for theme stylesheet inclusion via template deprecated in ↵Louise Crow2013-06-05-1/+0
| | | | | | | | | | | | version 0.5. Closes #972.
* | | Merge branch 'release/0.11' into rails-3-developLouise Crow2013-06-04-7/+32
|\| |
| * | Handle json requests for hidden info requests.Louise Crow2013-06-03-7/+32
| | |
* | | Merge remote-tracking branch ↵Louise Crow2013-06-04-86/+134
|\ \ \ | | | | | | | | | | | | 'openaustralia_github/more_info_on_report_request' into rails-3-develop
| * | | User needs to choose a reasonMatthew Landauer2013-03-22-5/+15
| | | |
| * | | Rename parameter used in routes and controllerMatthew Landauer2013-03-22-9/+9
| | | |
| * | | Rename controller actionsMatthew Landauer2013-03-22-11/+11
| | | |
| * | | Move reporting actions to their own controllerMatthew Landauer2013-03-22-118/+124
| | | |
| * | | Extract methodMatthew Landauer2013-03-22-1/+1
| | | |
| * | | Only allow posts for reporting request. Don't try redirection when not logged inMatthew Landauer2013-03-22-3/+4
| | | |
| * | | Posted reason and message gets sent out in the emailMatthew Landauer2013-03-22-0/+7
| | | |