aboutsummaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeLines
* Remove stray puts in test codeRobin Houston2012-01-27-1/+0
| | | | | This was added for temporary debugging purposes, and ought to have been removed.
* Add a trivial test for the list of recent requestsRobin Houston2012-01-27-10/+73
|
* Refactor test code so new test data can be addedRobin Houston2012-01-26-107/+176
| | | | | | | | 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
|
* Simplify search logic so it doesn't depend on sessions. Also fixes #338Seb Bacon2012-01-25-3/+3
|
* Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkSeb Bacon2012-01-25-61/+117
|\ | | | | | | | | Conflicts: app/controllers/request_controller.rb
| * More test isolationRobin Houston2012-01-24-0/+1
| | | | | | | | | | Towards #361. (Possibly even the very last one!) Fixes: spec/models/xapian_spec.rb spec/integration/search_request_spec.rb
| * More better test isolationRobin Houston2012-01-24-0/+1
| | | | | | | | | | Towards #361. Fixes: spec/models/xapian_spec.rb spec/controllers/user_controller_spec.rb
| * Improve test isolationRobin Houston2012-01-24-0/+2
| | | | | | | | | | Towards #361. Fixes: spec/models/xapian_spec.rb spec/controllers/general_controller_spec.rb
| * A couple more test isolation failuresRobin Houston2012-01-24-0/+2
| | | | | | | | Towards #361
| * Improve test isolationRobin Houston2012-01-24-0/+1
| | | | | | | | Another brick in the wall (#361)
| * Fix sporadic test failureRobin Houston2012-01-24-1/+6
| | | | | | | | Another contribution to #361.
| * Make sure the raw emails are loadedRobin Houston2012-01-24-38/+14
| | | | | | | | | | This fixes (at least) one of the failures in #361, viz spec/controllers/admin_request_controller_spec.rb spec/models/xapian_spec.rb
| * Fix a bunch of order-dependent failuresRobin Houston2012-01-24-1/+1
| | | | | | | | This fixes a lot of the failures in #361.
| * Add missing fixturesRobin Houston2012-01-23-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Improve test isolationRobin Houston2012-01-22-1/+2
| | | | | | | | This test was failing if run after, for example, general_controller_spec.rb.
| * Remove assumptionRobin Houston2012-01-20-6/+5
| | | | | | | | | | | | | | 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.
| * Clear routing filters while tests are runningRobin Houston2012-01-20-0/+10
| | | | | | | | | | | | 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.
| * Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkRobin Houston2012-01-20-13/+67
| |\
| | * Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkRobin Houston2012-01-20-1/+13
| | |\
| | * | Make sure the FakeWeb registry is kept cleanRobin Houston2012-01-20-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | Be sure to restore RoutingFiltersRobin Houston2012-01-20-13/+60
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Improved test isolationRobin Houston2012-01-20-0/+4
| | |/ | |/| | | | | | | | | | The test “AdminRequestController when administering requests shows a public body” would fail when this spec is run on its own twice in succession.
* | | Return a 404 for missing user profile pictures. Fixes #363Seb Bacon2012-01-24-0/+7
| | |
* | | Ensure short cache keys for interlock. Fixes #362Seb Bacon2012-01-24-0/+5
| | |
* | | Bug: we are causing a 500 when trying to raise 404 because the arguments to ↵Seb Bacon2012-01-24-0/+9
|/ / | | | | | | the exception constructor are wrong.
* / Don't allow users to page beyond a certain number of results (because in ↵Seb Bacon2012-01-20-1/+13
|/ | | | large databases, the sorting of such large batches causes an extreme slowdown).
* Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkSeb Bacon2012-01-19-2/+53
|\
| * Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkRobin Houston2012-01-19-2/+45
| |\
| | * Return a 404 for broken attachment urls. Fixes #351.Seb Bacon2012-01-18-0/+10
| | |
| | * Don't raise an error if the user deletes a track through the UI. Fixes #353.Seb Bacon2012-01-18-0/+7
| | |
| | * Fix more test breakageSeb Bacon2012-01-18-3/+12
| | |
| | * Catch timeouts and other extra errors when connection to 3rd party websites ↵Seb Bacon2012-01-18-1/+8
| | | | | | | | | | | | fails.
| | * Ensure request typeahead search is tested properly (and fix a validation error).Seb Bacon2012-01-18-0/+2
| | |
| | * Merge branch 'release/0.5' of github.com:sebbacon/alaveteli into release/0.5Seb Bacon2012-01-18-3/+11
| | |\
| | * | Fix paging bug for type ahead search. This wasn't caught because the spec ↵Seb Bacon2012-01-18-0/+8
| | | | | | | | | | | | | | | | didn't call "integrate_views", so the rendering part was mocked by RSpec instead of executed.
| * | | Fix sporadic spurious test failuresRobin Houston2012-01-19-0/+8
| | |/ | |/| | | | | | | | | | ...by forcing the IncomingMessage to be re-parsed after we have edited it.
* | | Don't choke on very long filenames when caching attachments. Fixes #349.Seb Bacon2012-01-19-0/+9
| | |
* | | Always show the right search snippet. Fixes #352.Seb Bacon2012-01-19-0/+7
|/ /
* | Merge branch 'wdtk' into release/0.5Robin Houston2012-01-17-3/+11
|\ \ | |/ |/|
| * Flexible location for validate utilityRobin Houston2012-01-17-3/+11
| | | | | | | | | | Allow the WDG HTML validation utility "validate" to be anywhere in UTILITY_SEARCH_PATH, rather than hard-coding /usr/bin.
* | Don't allow directory listings (better fix for and closes #340).Seb Bacon2012-01-17-3/+6
|/
* Test for commit 9099f63a364242764da529c109166e69fd2ec606Seb Bacon2012-01-17-2/+2
|
* Test belonging to commit a39f71ee21739eb754688f185c59c3a7f209aaaSeb Bacon2012-01-17-3/+3
|
* Test fix that belongs to e82ca928a140400f8446dba85014a0c9059e789bSeb Bacon2012-01-17-1/+1
|
* Actually do a proper ORed and partial match query, rather than fix parsing ↵Seb Bacon2012-01-17-2/+12
| | | | errors ad hoc as I find them that result from the workaround code. Fixes #328 (for good, I hope).
* Fail silently if third party services are broken or unavailable. Fixes #354.Seb Bacon2012-01-17-6/+31
|
* Merge branch 'fast-search-hack' into wdtk. Addresses the second slow SQL ↵Seb Bacon2012-01-13-1/+4
|\ | | | | | | example at issue #327, at least in part.
| * Changes to make normal search pages not necessarily load info_request_events ↵Seb Bacon2012-01-12-1/+4
| | | | | | | | every time