aboutsummaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeLines
* Don't send comment alerts for external requests.Louise Crow2012-08-22-0/+10
|
* Re-enable testing of comment links in emails.Louise Crow2012-08-22-7/+2
|
* Clearer formatting of global fixtures list.Louise Crow2012-08-22-7/+21
|
* Fix comment typo.Louise Crow2012-08-22-2/+2
|
* Allow external requests to be hidden from the admin interface.Louise Crow2012-08-22-0/+50
|
* Don't pass a page param of less than one through to Xapian, treat it as a ↵Louise Crow2012-08-21-1/+8
| | | | param of 1. Fixes #557.
* Merge branch 'develop' of github.com:sebbacon/alaveteli into developLouise Crow2012-08-20-5/+24
|\
| * Fail with NotFound if request slug doesn't existRobin Houston2012-08-20-1/+20
| | | | | | | | Closes #554.
| * Fix another testRobin Houston2012-08-20-1/+1
| | | | | | | | | | | | | | | | | | | | | | Is there actually any point in tests of this sort? It is not testing that anything works as intended, only that a particular SQL string is passed to the database -- and surely the only way that string could have been discovered for test purposes was essentially to copy it from the code under test. It seems to me that the only real function of a test of this sort is to make it more difficult to modify the code under test.
| * 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.
* | Use find_by_url_title! to raise ActiveRecordNotFound in upload response when ↵Louise Crow2012-08-20-0/+4
|/ | | | | | no record is found using url_title. Closes #553.
* Merge branch 'wdtk' into developLouise Crow2012-08-16-314/+433
|\ | | | | | | | | | | | | Conflicts: app/controllers/admin_request_controller.rb config/httpd.conf spec/models/info_request_spec.rb
| * When displaying attachments, only cache them out to files if they are ↵Louise Crow2012-08-16-198/+219
| | | | | | | | visible to everyone, so can be served up from a file cache without authentication.
| * Fix typo in comment.Louise Crow2012-08-16-18/+87
| |
| * 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.
* | Add failing test showing a bug when clicking 'Import from CSV file' on the ↵Henare Degan2012-08-11-0/+7
| | | | | | | | admin public authorities page
* | Add before and after methods to isolate any effect these tests have on locale.Louise Crow2012-08-01-2/+12
| |
* | Merge branch 'feature/public-body-api-2a' into developRobin Houston2012-07-16-1/+10
|\ \
| * | Beef up mocksRobin Houston2012-07-16-1/+10
| |/ | | | | | | | | Add the user_name and is_external? properties to the InfoRequest mock objects used for view testing, where necessary.
* | Misc fixes to get tests to pass - notably a MonkeyPatch to work around ↵Seb Bacon2012-07-13-0/+14
| | | | | | | | problem testing template results
* | Support regular expressions in CensorRules; also support 'global' ↵Seb Bacon2012-07-13-2/+61
|/ | | | CensorRules that aren't attached to a User or Request or Public Body (but don't expose this in the admin UI). Fixes #33
* JSON new events feedRobin Houston2012-07-04-1/+39
|
* Atom feed of request eventsRobin Houston2012-07-04-0/+16
| | | | | | | | | | We need not only new requests, but new outgoing correspondence of any sort. The idea is that this feed will contain any event that would have triggered an email to be sent to the public body, so can be used as an alternative, equivalent way to stay up-to-date with happenings on WDTK (or the Alaveteli installation of choice).
* Don't allow non-superusers to access admin interface (eek!) Fixes #515Seb Bacon2012-06-27-1/+9
|
* Merge branch 'develop' of github.com:sebbacon/alaveteli into developRobin Houston2012-06-23-26/+13149
|\ | | | | | | | | | | | | | | Conflicts: Gemfile.lock script/handle-mail-replies script/handle-mail-replies.rb spec/controllers/request_controller_spec.rb
| * Only invalidate a user's cached requests when their *name* changes. ↵Seb Bacon2012-06-20-1/+7
| | | | | | | | Otherwise we issue PURGEs every time, for example, we send out email alerts.
| * Fix test to match current wordingSeb Bacon2012-06-19-1/+1
| |
| * Correctly name the person who has requested something for admin attentionSeb Bacon2012-06-19-0/+1
| |
| * Revert "Set a "Content-Disposition: attachment" header when downloading ↵Seb Bacon2012-06-15-9/+1
| | | | | | | | | | | | | | | | files. Closes #428" This reverts commit 506af7a640f63b17000ccfc5e1344bbc3039c913. See issue #428 for a discussion
| * Ensure we generate URLs containing the current locale, even if the locale ↵Seb Bacon2012-06-14-1/+4277
| | | | | | | | | | | | contains an underscore. Includes a bonus test to ensure that locales with unknown territories fall back to known languages.
| * Use PO files from `spec/fixtures/locale` rather than the application - makes ↵Seb Bacon2012-06-14-0/+8821
| | | | | | | | it less brittle.
| * Fix bug that was preventing Rails from loading when *not* in test mode ↵Seb Bacon2012-06-14-0/+6
| | | | | | | | (exposed by the bug fixed in 7c846594 that was introduced in 775e122c)
| * Fix test breakage (really we should use a test app.po rather than the real ↵Seb Bacon2012-06-14-1/+1
| | | | | | | | one for testing!)
| * Use POST rather than GET for tests (this matches better what the UI does)Seb Bacon2012-06-12-4/+4
| |
| * Ensure attention-requesting tests pass by faking a logged in userSeb Bacon2012-06-12-0/+5
| |
| * Make emails requesting admin attention appear to come from the user who ↵Seb Bacon2012-06-12-0/+10
| | | | | | | | requested the attention, not the user who made the original request.
* | API controller tests all passRobin Houston2012-06-18-3/+15
| |
* | Fix test for updated test dataRobin Houston2012-06-07-1/+1
| | | | | | | | | | Replace another constant with a computed value, so we can accommodate new test data without spuriously failing.
* | Beef up mocks with new methodRobin Houston2012-06-07-1/+3
| |
* | Make test more flexibleRobin Houston2012-06-07-3/+3
| | | | | | | | | | | | | | Remove another dependency of a test on the aggregate set of test data, part of a long-term programme to make it easier to add test data (and required here because recently-added test data was causing these tests to fail!)
* | Need another stub nowRobin Houston2012-06-07-0/+1
| |
* | Update tests to reflect code changesRobin Houston2012-06-07-0/+23
| | | | | | | | | | Since users must now be logged-in to report requests, the tests need to reflect this.
* | Update test for e3cfe550fe835c68b25d693abd40aedd954913b3Robin Houston2012-06-07-1/+1
| | | | | | | | | | The wording that was changed by e3cfe550fe835c68b25d693abd40aedd954913b3 turns out to be relied on by one of the tests.
* | WIP attachment uploading via APIRobin Houston2012-06-06-4/+20
| |
* | Test for attaching a file via the APIRobin Houston2012-06-06-0/+36
| | | | | | | | Not yet implemented, so the test fails.
* | Correct comment\Robin Houston2012-06-06-1/+1
| |
* | Use a fixture for the external requestRobin Houston2012-06-06-4/+39
| |
* | Fix typo in fixture yamlRobin Houston2012-06-06-2/+2
| | | | | | | | | | I’m sure created_at should not have been there twice. Presumably the second one was supposed to be updated_at.
* | API: Some testing of show_requestRobin Houston2012-06-06-0/+13
| |
* | API: test also for refusal conditionsRobin Houston2012-06-06-0/+39
| | | | | | | | | | | | The API must not allow people to update requests that they shouldn’t, i.e. only requests that were created by the same public body, using the API, can be added to using the API.