aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
Commit message (Collapse)AuthorAgeLines
* Add warning about regex censor rules.Louise Crow2012-08-14-1/+1
| | | | Fix spec to accommodate validation of text presence.
* Validate presence of text to replace in censor rules.Louise Crow2012-08-14-0/+6
|
* Add basic validation for regexp censor rules that a valid regexp can be ↵Louise Crow2012-08-14-1/+35
| | | | created with the text of the rule.
* Make global validation work correctly for regex censor rules.Louise Crow2012-08-14-2/+9
|
* Apply global and public body censor rules to binary files.Louise Crow2012-08-14-23/+60
|
* Add case of a regex censor rule to test of binary masking.Louise Crow2012-08-14-13/+20
|
* Handle regexp rules when running censor rules on binary files.Louise Crow2012-08-14-6/+18
|
* Add association between public bodies and censor rules, have info_request ↵Louise Crow2012-08-14-0/+8
| | | | apply rules from its public body.
* Add concept of global censor rules as orthogonal to regex censor rules. ↵Louise Crow2012-08-14-144/+235
| | | | Apply global rules to every request, not regex rules.
* Misc fixes to get tests to pass - notably a MonkeyPatch to work around ↵Seb Bacon2012-07-13-0/+1
| | | | 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
* 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.
* 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
|
* Test to ensure users who have opted out of alert emails don't get anySeb Bacon2012-05-30-0/+7
|
* Fix tests that broke as result of new flag to control if email alerts should ↵Seb Bacon2012-05-30-0/+2
| | | | be sent
* Correctly create tracks for searches that are filtered by variety:authority ↵Seb Bacon2012-05-11-0/+5
| | | | via the search UI
* Empty the purge queue even for failed requests (otherwise we will be ↵Seb Bacon2012-05-04-1/+1
| | | | endlessly polling the Varnish server until its fixed). Administrators should check the logs for failed purges.
* Make the order of words in a track_thing description deterministic, so the ↵Seb Bacon2012-05-02-1/+1
| | | | test always passes
* More changes and refactoring to make purges work.Seb Bacon2012-04-20-0/+32
|
* Don't add http when https is presentHenare Degan2012-03-13-0/+6
|
* Don't add extra www characters to web addresses that have been explicitly ↵Henare Degan2012-03-13-1/+1
| | | | defined
* Make public authority home page links work. Fixes #271Henare Degan2012-03-13-0/+6
|
* Add some tests for the public body home page calculationHenare Degan2012-03-13-0/+22
|
* Eliminate trailing spaces in test namesRobin Houston2012-02-03-1/+1
| | | | Really, what was that about?
* Better test assertionsRobin Houston2012-02-03-17/+17
| | | | | Change the test assertions so they give more informative errors when they fail -- as they sometimes do: see issue #408.
* Update testRobin Houston2012-01-31-1/+1
| | | | Update test to take account of change 76fd5f9.
* Load all fixtures for all testsRobin Houston2012-01-31-40/+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.
* Load all raw emails for testingRobin Houston2012-01-29-22/+22
| | | | | | | | | | | 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.
* Remove stray puts in test codeRobin Houston2012-01-27-1/+0
| | | | | This was added for temporary debugging purposes, and ought to have been removed.
* Refactor test code so new test data can be addedRobin Houston2012-01-26-39/+33
| | | | | | | | 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.
* A couple more test isolation failuresRobin Houston2012-01-24-0/+2
| | | | Towards #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
* Improve test isolationRobin Houston2012-01-22-1/+2
| | | | This test was failing if run after, for example, general_controller_spec.rb.
* Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkSeb Bacon2012-01-19-0/+15
|\
| * Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtkRobin Houston2012-01-19-0/+7
| |\
| | * Don't raise an error if the user deletes a track through the UI. Fixes #353.Seb Bacon2012-01-18-0/+7
| | |
| * | Fix sporadic spurious test failuresRobin Houston2012-01-19-0/+8
| |/ | | | | | | | | ...by forcing the IncomingMessage to be re-parsed after we have edited it.
* / Always show the right search snippet. Fixes #352.Seb Bacon2012-01-19-0/+7
|/
* 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
* | Fix bug introduced in cec2c545e0a10e0641c4ee67839c88d872b394b8, related to ↵Seb Bacon2012-01-13-8/+11
| | | | | | | | issue #343.
* | To get around occasional race conditions, instead of forcing an fsync, retry ↵Seb Bacon2012-01-13-9/+9
|/ | | | getting the body a few times before failing. May be related to issue #333 and #339
* Use correct column type for sent_at date (was only preserving time and not ↵Seb Bacon2012-01-10-0/+2
| | | | date, resulting in incoming_messages all apparently being sent on January 1, 2000)
* Test for commit caff0a3ff2e38a5aab906baa4cc77d30587e1184 (ensure we always ↵Seb Bacon2012-01-09-0/+36
| | | | regenerate attachments cache when necessary)
* Ensure attachments have been parsed before generating cached extractsSeb Bacon2012-01-05-0/+7
|
* Correctly test for auto-submitted headers. Fixes #316.Seb Bacon2012-01-05-14/+13
|
* Display internationalized emails correctly (specifically, RFC2047 headers, ↵Seb Bacon2012-01-04-0/+22
| | | | and HTML emails with encoding in a meta-tag). Fixes #281
* Ensure we always censor safe_mail_from; and mention new only-parse-once ↵Seb Bacon2011-12-21-5/+3
| | | | feature in CHANGES.md
* Further improvements to attachment cachingSeb Bacon2011-12-13-9/+12
|