aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
Commit message (Collapse)AuthorAgeLines
* Extract methodMatthew Landauer2012-09-27-1/+1
|
* Add option to override all public body request emailsMatthew Landauer2012-09-27-0/+8
|
* Remove debug line.Louise Crow2012-09-26-1/+0
|
* Make template finding for themes work with multipart mails. Fixes #628.Louise Crow2012-09-25-2/+155
|
* Test for the presence of the explanatory text as well when checking the ↵Louise Crow2012-09-25-1/+4
| | | | response to an email to a fully closed request.
* Rename methodMatthew Landauer2012-09-24-4/+4
|
* Handle times passed to Holiday.due_date_from_calendar_daysMatthew Landauer2012-09-24-0/+4
|
* Add due date calculation based on calendar days rather than working daysMatthew Landauer2012-09-24-30/+63
|
* Allow InfoRequest.find_old_unclassified to accept an offset param so it can ↵Louise Crow2012-09-13-0/+8
| | | | be used in conjunction with pagination.
* Memoize the notes_without_html calculated value for the life of the model ↵Louise Crow2012-09-12-0/+14
| | | | instance - no need to keep applying the regex if called multiple times e.g. in a view.
* Ignore spacing differences when checking generated SQL, use caps for SQL ↵Louise Crow2012-09-11-9/+24
| | | | reserved words.
* Add some more efficient methods for getting old unclassified request counts, ↵Louise Crow2012-09-11-11/+40
| | | | and random sets of small numbers of old unclassified requests.
* Quote name correctly in query. Fixes #598.Louise Crow2012-09-04-0/+4
|
* Update references to point to the mySociety repo.Louise Crow2012-08-29-32/+32
|
* Merge branch 'release/0.6.3' into developLouise Crow2012-08-22-65/+266
|\ | | | | | | | | | | | | | | Conflicts: app/controllers/admin_public_body_controller.rb app/views/admin_public_body/import_csv.rhtml spec/controllers/admin_public_body_controller_spec.rb spec/models/info_request_spec.rb
| * 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.
* | 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.
* | Merge branch 'wdtk' into developLouise Crow2012-08-16-98/+127
|\ \ | |/ |/| | | | | | | | | Conflicts: app/controllers/admin_request_controller.rb config/httpd.conf spec/models/info_request_spec.rb
| * 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.
* | 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.