| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
| |
Add the facility to filter the public body feed by event type
using a query string parameter, e.g. event_type=sent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the "log in as" function after 3b6e5a692b852a88f55b21a7210f60a6f7cfc24b
would attempt to log the admin user out before issuing the redirect. Unfortunately
this approach does not work on WhatDoTheyKnow, where the admin pages are served via
a different domain (secure.mysociety.org) and so do not share session information with
the rest of the site.
This commit changes it to mark the PostRedirect with circumstance == "login_as",
which signals the user controller to log out the previous user even if they are
an admin. In other words, the user is logged out on the main site rather than the
admin site, skirting this problem.
Closes #450.
|
|
|
|
| |
Fixes #446. See issue for details.
|
|
|
|
| |
Closes #415.
|
|
|
|
|
|
| |
Don't change logged-in user from an admin when visiting a auto-login URL.
Closes #306.
|
|
|
|
| |
Fixes #407.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #409 seems to be another problem of the same type as #408,
though with the important difference that the bug in this case
is in the test suite rather than the code under test.
RequestMailer sends alert emails warning of overdue requests.
However it does not specify the order that these messages are
sent in, but runs over the overdue requests in whatever order
they are returned by a database query (that does not have an
order by clause). Therefore it is not safe for the test code
to assume that the alert mails will have been sent in a particular
order: just as with #408 it seems that they were *usually* sent
in the order assumed by the test code, but occasionally not --
which would result in sporadic test failures.
Closes #409.
|
|
|
|
| |
Really, what was that about?
|
|\
| |
| |
| |
| | |
Conflicts:
locale/app.pot
|
| |
| |
| |
| | |
Corrected diagnosis, test & fix for issue #351. Fixes #351.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
the tin
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Conflicts:
config/general.yml-example
doc/CHANGES.md
|
| |/
| |
| |
| |
| | |
I am not sure why the tests anyway passed with this mistake, but
clearly those trailing .should's ought not to have been there.
|
| | |
|
|/
|
|
| |
At the same time, cause the tests not to rely on WDTK data. Fixes #396
|
|
|
|
|
|
| |
Add the capability to specify a limit to the number of requests a
user can make per day, which can be turned off for specific users
in the admin interface.
|
|
|
|
| |
Test that duplicate requests are coalesced on the front page.
|
|
|
|
|
|
|
| |
Put the most-recently-answered first, rather than the
most-recently-reclassified. This is inspired by issue #370,
though it does not fix all the issues raised in that ticket.
(The wording is still outright misleading in some cases.)
|
|
|
|
|
|
| |
Add some more test data, and fix the tests to accommodate both this
new test data and the fact that raw emails are now correctly loaded
into the test environment.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Might as well be consistent about clearing the test censor rules in an ensure block.
This would only mean that an exception in one test is less likely to cause unrelated
failures in another.
|
|
|
|
|
| |
This is a test for what I thought issue #370 might be. However this
test is passing, so it isn’t that.
|
| |
|
|
|
|
|
|
|
|
| |
Previously many of the tests made assumptions about the global
structure of the test data set: the total number of requests, for
example, or the names of all public bodies. This makes it difficult
to add to the test data. This change is intended to make the test
data easier to extend by eliminating such global assumptions.
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
app/controllers/request_controller.rb
|
| |
| |
| |
| |
| | |
Towards #361. Fixes:
spec/models/xapian_spec.rb spec/controllers/user_controller_spec.rb
|
| |
| |
| |
| |
| | |
Towards #361. Fixes:
spec/models/xapian_spec.rb spec/controllers/general_controller_spec.rb
|
| |
| |
| |
| | |
Another contribution to #361.
|
| |
| |
| |
| | |
This fixes a lot of the failures in #361.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Without this addition, the "shows a user" test would fail unless run in a
context where the public body fixtures had already been loaded, with an
error like this:
ActionView::TemplateError in 'AdminUserController when administering users shows a user'
undefined method `name' for nil:NilClass
On line #14 of app/views/admin_request/_some_requests.rhtml
11: <% for info_request in info_requests %>
12: <tr class="<%= cycle('odd', 'even') %>">
13: <td><%= request_both_links(info_request) %></td>
14: <td><%= public_body_both_links(info_request.public_body) %></td>
15: <td><%= user_both_links(info_request.user) %></td>
16: <% for column in InfoRequest.content_columns.map { |c| c.name } - [ "title", "url_title" ] %>
17: <td><%=h info_request.send(column) %></td>
|
| |
| |
| |
| |
| |
| |
| | |
I feel uncomfortable about the assumption that FastGettext.default_available_locales
is always equal to I18n.available_locales. Even if that’s true now, it might not
always be -- and if a bug causes them to become erroneously different, the previous
code would have masked that.
|
| |
| |
| |
| |
| |
| | |
This fixes a test failure that would show up when running this spec
in isolation -- but not necessarily when running all tests, depending
on the order they run in.
|
| |\ |
|
| | |\ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
To be fair this change does not seem to make any tests pass that
didn’t pass before, but (based on my limited understanding) it
seems like a good idea. It also conforms to how FakeWeb is used
in application_controller_spec.rb.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There were some order-dependent test failures that turned out to
be caused by the fact that the RoutingFilters were cleared and
not subsequently restored, by some tests.
|
| | |/
| |/|
| | |
| | |
| | | |
The test “AdminRequestController when administering requests shows a public body”
would fail when this spec is run on its own twice in succession.
|
| | | |
|
| | | |
|
|/ /
| |
| |
| | |
the exception constructor are wrong.
|
|/
|
|
| |
large databases, the sorting of such large batches causes an extreme slowdown).
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
fails.
|
| | |
|