| Commit message (Collapse) | Author | Age | Lines |
... | |
| | |
|
| |
| |
| |
| |
| | |
Make specs that depend on multiple controllers and models interacting
integration specs.
|
| |
| |
| |
| | |
Eventually this should use standard RESTful routing.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
app/controllers/public_body_controller.rb
config/general.yml-example
lib/configuration.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
It's useful to be able to generate example public bodies that only
have translations in particular languages.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|/ / |
|
|/
|
|
| |
Set to 'waiting_response' on creation, to match the displayed state.
|
|
|
|
| |
suffixed with a number.
|
|\ |
|
| |
| |
| |
| | |
118n.locale in the handling of locales with underscores. Fixes #999.
|
| |
| |
| |
| | |
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.
|
|\ \
| |/
|/|
| |
| |
| |
| | |
'openaustralia_github/tests_set_described_state' into rails-3-develop
Conflicts:
spec/models/info_request_spec.rb
|
| | |
|
| |
| |
| |
| |
| |
| | |
default to HTML. Fixes #989."
This reverts commit c1b3324922687778b316ee1a180582013bcf6d0e.
|
| | |
|
| |
| |
| |
| | |
HTML. Fixes #989.
|
| |
| |
| |
| | |
with a 406, not a 500 caused by a missing template.
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
spec/mailers/outgoing_mailer_spec.rb
|
| | |
| | |
| | |
| | | |
expire the template cache and trigger a lookup.
|
| | |
| | |
| | |
| | | |
so ignore any format from content negotiation in favour of that default.
|
| | |
| | |
| | |
| | | |
loaded.
|
| | |
| | |
| | |
| | | |
a requirement to have loaded the raw emails, which is tangential to what we're testing.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
so ignore any format from content negotiation in favour of that default.
|
| | |
| | |
| | |
| | | |
version 0.5. Closes #972.
|
|\| | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
'openaustralia_github/more_info_on_report_request' into rails-3-develop
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | |
| | | | |
'openaustralia_github/inline_search_method_refactor' into rails-3-develop
|
| |/ / |
|
| | |
| | |
| | |
| | | |
Fixes #961
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Previously the behaviour would have been the same, since we weren't
checking the filename so strictly.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit changes 'hello.txt' to 'hello-world.txt' in the
incoming-request-two-same-name.email fixture. The reasoning
for this change is that if there are no special characters in
the filename then filename and display_filename will be the
same and the tests won't pick up any confusion between the
two.
The test requests to :get_attachment and
:get_attachment_as_html should get the display_filename rather
than filename.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the display_filename of the attachment found from the
URL part number doesn't match the passed in display_filename
then the email may have been reparsed, causing a reordering.
In that case, look to see if there is another attachment that
uniquely matches that filename, and, if so, return that other
attachment. If no matching uniquely matching filename is
found, redirect to the incoming message, rather than
returning a 404.
|