aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
Commit message (Collapse)AuthorAgeLines
...
* Fix comment typo.Louise Crow2012-08-22-2/+2
|
* 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-0/+6
|\
| * Fail with NotFound if request slug doesn't existRobin Houston2012-08-20-0/+6
| | | | | | | | Closes #554.
* | 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.
* 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.
* Merge branch 'develop' of github.com:sebbacon/alaveteli into developRobin Houston2012-06-23-24/+44
|\ | | | | | | | | | | | | | | 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
| * 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.
* | 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.
* Test for reporting functionalitySeb Bacon2012-05-24-0/+41
|
* Fix typo (introduced in commit cc023c67) that broke a testSeb Bacon2012-05-11-1/+1
|
* Don't cache results from pages with different locales using the same key. ↵Seb Bacon2012-05-04-1/+9
| | | | Fixes #454
* Don't ever create more than one entry for each URL that we want Varnish to ↵Seb Bacon2012-05-04-0/+10
| | | | purge.
* Modify InfoRequest stubs so they work with tests that iterate over the ↵Seb Bacon2012-05-02-0/+4
| | | | collection (e.g. `@user.info_requests.each`)
* More changes and refactoring to make purges work.Seb Bacon2012-04-20-13/+8
|
* Merge branch 'develop' into purge-requestsSeb Bacon2012-04-19-11/+10
|\ | | | | | | | | Conflicts: spec/controllers/request_controller_spec.rb
| * Merge pull request #464 from jpmckinney/small-fixesRobin Houston2012-04-03-1/+1
| |\ | | | | | | Small fixes
| | * use Rails.root, not RAILS_ROOTJames McKinney2012-04-02-1/+1
| | |
| * | Remove cache/zips/ before running tests that write to thereMark Longair2012-04-02-0/+1
| |/
| * Fix broken testRobin Houston2012-03-13-5/+5
| |
| * Correct bad nestingRobin Houston2012-03-13-3/+2
| |
| * Admin users clicking confirmation linksRobin Houston2012-03-13-1/+1
| | | | | | | | Fixes #446. See issue for details.
| * Merge jpmckinney/bundlerSeb Bacon2012-02-15-2/+0
| |
| * Set a "Content-Disposition: attachment" header when downloading files. ↵Seb Bacon2012-02-15-1/+9
| | | | | | | | Closes #428
| * Make /similar/request/NONESUCH a 404 not 500 errorRobin Houston2012-02-10-0/+24
| | | | | | | | Fixes #421.
* | first stab at sending PURGE requests to upstream varnish for request pages. ↵Seb Bacon2012-03-13-1/+57
| | | | | | | | Next step: making it asynchronous, e.g. with a queue of things to purge via a cron job.
* | Set a "Content-Disposition: attachment" header when downloading files. ↵Seb Bacon2012-03-13-1/+9
| | | | | | | | Closes #428
* | Make /similar/request/NONESUCH a 404 not 500 errorRobin Houston2012-03-13-0/+24
|/ | | | Fixes #421.
* Test should not depend on nondeterministic orderRobin Houston2012-02-03-9/+12
| | | | | | | | | | | | | | | | | | 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.
* Eliminate trailing spaces in test namesRobin Houston2012-02-03-2/+2
| | | | Really, what was that about?
* issue #351 reduxRobin Houston2012-02-01-4/+41
| | | | Corrected diagnosis, test & fix for issue #351. Fixes #351.
* Load all fixtures for all testsRobin Houston2012-01-31-19/+0
| | | | | | | | | 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.
* Rate limitingRobin Houston2012-01-29-0/+53
| | | | | | 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.
* More test data, and fix testsRobin Houston2012-01-29-14/+21
| | | | | | 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.
* Load all raw emails for testingRobin Houston2012-01-29-12/+12
| | | | | | | | | | | 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.
* clearing the test censor rules in an ensure blockRobin Houston2012-01-27-7/+9
| | | | | | 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.
* More test data and a new testRobin Houston2012-01-27-3/+11
| | | | | This is a test for what I thought issue #370 might be. However this test is passing, so it isn’t that.
* Refactor test code so new test data can be addedRobin Houston2012-01-26-9/+50
| | | | | | | | 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.
* Fix #372Robin Houston2012-01-26-10/+26
|
* Correct test titleRobin Houston2012-01-25-1/+1
|
* Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkSeb Bacon2012-01-25-2/+11
|\ | | | | | | | | Conflicts: app/controllers/request_controller.rb
| * Fix sporadic test failureRobin Houston2012-01-24-1/+6
| | | | | | | | Another contribution to #361.
| * Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkRobin Houston2012-01-20-1/+11
| |\