aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib
Commit message (Collapse)AuthorAgeLines
* Make sure spelling corrections are encoded as UTF-8Louise Crow2015-05-28-0/+29
|
* Cleanup spec.Louise Crow2015-05-26-52/+54
| | | | Remove unneeded setup, fixtures are not used in these specs.
* Move acts_as_xapian specs to own file.Louise Crow2015-05-26-0/+73
|
* Handle invalid 'to' addresses.Louise Crow2015-05-22-0/+10
|
* Handle the expected case where conversion fails and returns nil.Louise Crow2015-04-02-0/+5
|
* Merge branch 'hotfix/0.20.0.11' into rails-3-developLouise Crow2015-02-13-2/+15
|\
| * Set binary mode to false in call to pdftohtmlLouise Crow2015-02-13-2/+15
| | | | | | | | | | We want the HTML to be encoding in the default encoding so that it can be combined with other strings.
* | Refactor the application of masks and censor rules to messages.Louise Crow2014-12-15-0/+146
|/ | | | | | | | | | Seems more logical to make this one method that figures out what to do based on file type. Plus, incoming message does so many things, it seemed like having these related methods be separate would make them easier to read and understand. Also, email, mobile and login substitution texts weren't being translated. Finally, I think passing the censor rules and masks as arguments is a first step in some more decoupling of models.
* Add fix for Apple Mail with attachments Gareth Rees2014-11-04-0/+6
|
* Add some specs to MailBackendGareth Rees2014-11-04-0/+145
|
* Merge branch 'issues/222-category-editing-add-order-interface' into ↵Louise Crow2014-10-14-42/+0
|\ | | | | | | rails-3-develop
| * Replace existing PublicBodyCategories functionality with db models ↵lizconlan2014-09-22-42/+0
| | | | | | | | PublicBodyCategory and PublicBodyHeading
* | Replace initial checks with DaysAgoCheckGareth Rees2014-09-25-84/+66
| |
* | Add some initial health checksGareth Rees2014-09-25-0/+84
| |
* | Add HealthCheck and HealthCheckableGareth Rees2014-09-25-0/+205
|/ | | | | | | HealthCheck is a basic library for creating health checks. HealthCheck works with any class so long as it includes HealthCheckable and defines the `check` method.
* Add charset to view-as-html templateGareth Rees2014-08-19-0/+1
|
* Merge branch 'issues/1415-bulk-update-public-bodies' into rails-3-developGareth Rees2014-06-25-0/+114
|\
| * Extract public body CSV export to its own classGareth Rees2014-06-06-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - SRP: Do one thing. PublicBodyCSV converts a collection of bodies in to a CSV formatted String - Adds some parenthesis around parameters in PublicBodyController#list_all_csv - Let the controller handle what records to pull out for the CSV export Arguably this doesn't really need to be anything to do with PublicBody, but it allows us to set nice defaults.
* | Handle converting empty RTF fileshotfix/0.18.0.3Gareth Rees2014-06-06-0/+11
|/ | | | Fixes https://github.com/mysociety/alaveteli/issues/1563
* Work around bug#77932 in pdftohtmlGareth Rees2014-05-06-0/+37
| | | | | | | | | Sometimes pdftohtml will generate thousands of images when converting an image embedded in a PDF. This causes a request spike when a user tries to view the converted PDF as HTML. See https://bugs.freedesktop.org/show_bug.cgi?id=77932 for the bug report.
* Remove dependency on timezone in configLouise Crow2014-05-02-10/+12
|
* Merge branch 'issues/1390-james-cheshire-infographic' into rails-3-developGareth Rees2014-05-01-0/+29
|\
| * Extract quarters_between to DateQuarter libGareth Rees2014-05-01-0/+29
| |
* | Merge branch 'hotfix/0.17.0.1' into rails-3-developLouise Crow2014-04-25-0/+5
|\ \ | |/ |/|
| * Fix for badly-formed content-disposition header.Louise Crow2014-04-25-0/+5
| | | | | | | | Taken from https://github.com/mikel/mail/pull/602
* | Dynamically inject AttachmentToHTML::View contentGareth Rees2014-04-07-0/+5
| |
* | Remove redundant AttachmentToHTML::HTMLGareth Rees2014-04-07-24/+0
| |
* | Update AttachmentToHTML for new View classGareth Rees2014-04-07-6/+24
| |
* | Simpler AttachmentToHTML::Adapters::CouldNotConvert interfaceGareth Rees2014-04-07-40/+9
| |
* | Simpler AttachmentToHTML::Adapters::GoogleDocsViewer interfaceGareth Rees2014-04-07-42/+10
| |
* | Simpler AttachmentToHTML::Adapters::RTF interfaceGareth Rees2014-04-07-60/+22
| | | | | | | | | | | | | | | | | | | | | | TODO: We really should be testing the full output of RTF#body, but we currently want to remain consistent with Adapters::PDF as many methods are shared between the Adapters. A more correct spec might be: expected = %Q(<font size=3><font color="#000000">thisisthebody</font></font>) adapter.body.should == expected
* | Simpler AttachmentToHTML::Adapters::PDF interfaceGareth Rees2014-04-07-56/+21
| | | | | | | | | | | | | | | | | | | | | | TODO: We really should be testing the full output of PDF#body, but inconsistencies between pdftohtml prevent sensible means of doing this. For example: adapter.body.should == %Q(\n<A name=1></a>thisisthebody<br/>\n<hr>\n) Fails because some versions (correctly!) use lower case tag names.
* | Simpler AttachmentToHTML::Adapters::Text interfaceGareth Rees2014-04-07-73/+22
| |
* | Add an AttachmentToHTML::View to deal with renderingGareth Rees2014-04-07-0/+145
| |
* | Work around a bug in unrtfGareth Rees2014-04-01-0/+25
| |
* | Add AttachmentToHTML libraryGareth Rees2014-03-28-0/+537
| | | | | | | | | | | | | | | | | | | | | | | | Extracts the attachment processing from FoiAttachment#body_to_html AttachmentToHTML contains adapters which convert - text/plain - application/pdf - application/rtf Results are returned as an AttachmentHTML::HTML instance which contains the raw HTML and other metadata about the conversion.
* | Add encoding lineLouise Crow2014-03-14-0/+1
| |
* | Rename spec files so they're run by rake spec.Louise Crow2014-03-13-0/+0
| |
* | Merge remote-tracking branch ↵Louise Crow2014-03-13-10/+10
|\ \ | |/ |/| | | 'opennewzealand_github/feature/handle-undefined-conversion' into rails-3-develop
| * needs _spec.rb to be run by `rake spec`Rowan Crawford2014-03-01-0/+0
| |
| * Fix tests for basic encodingRowan Crawford2014-03-01-10/+10
| |
* | Merge branch 'trap-abnormal-exits' into rails-3-developLouise Crow2014-01-23-0/+30
|\ \ | |/ |/|
| * Rename tests to be clear as to what is being testedIan Chard2014-01-23-1/+1
| |
| * Tests for abnormal exit detectionIan Chard2014-01-14-0/+30
| |
| * Session keys are stored as strings in Rails 3.0.15.0.1hotfix/0.15.0.1Louise Crow2013-11-19-28/+28
| | | | | | | | Update our session-stripping code.
* | Treat any document/pdf attachment as if it were application/pdfMark Longair2013-12-03-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix for issue #1232. Richard Taylor pointed out that some PDF attachments had the non-standard content-type document/pdf, and that these weren't being treated as PDFs. (Ganesh Sittampalam discovered that all of these PDFs were generated by a Lexmark X945e, according to the PDF metadata.) This commit adds an extra case to normalise_content_type to map document/pdf to application/pdf. In fact, since the upgrade of the Mail gem in ccebe3c3d6d4dc5f81 the behaviour when handling the non-standard content-type document/pdf was much better, but this commit also means that you get the right icon for the attachment, and can be cherry-picked onto older versions to fix #1232.
* | Merge branch 'feature/rails-3-2-upgrade-spike' into ↵Mark Longair2013-11-29-89/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | feature/switch-to-asset-pipeline Conflicts: Gemfile.lock app/assets/images/admin-theme/ui-bg_flat_0_aaaaaa_40x100.png app/assets/images/admin-theme/ui-bg_flat_55_fbf9ee_40x100.png app/assets/images/admin-theme/ui-bg_flat_65_ffffff_40x100.png app/assets/images/admin-theme/ui-bg_flat_75_cccccc_40x100.png app/assets/images/admin-theme/ui-bg_flat_75_dadada_40x100.png app/assets/images/admin-theme/ui-bg_flat_75_e6e6e6_40x100.png app/assets/images/admin-theme/ui-bg_flat_75_ffffff_40x100.png app/assets/images/admin-theme/ui-bg_inset-soft_95_fef1ec_1x100.png app/assets/images/admin-theme/ui-icons_222222_256x240.png app/assets/images/admin-theme/ui-icons_2e83ff_256x240.png app/assets/images/admin-theme/ui-icons_454545_256x240.png app/assets/images/admin-theme/ui-icons_888888_256x240.png app/assets/images/admin-theme/ui-icons_cd0a0a_256x240.png app/assets/javascripts/admin.js app/assets/javascripts/admin/jquery-ui.min.js app/assets/javascripts/application.js app/assets/javascripts/jquery-ui.min.js app/assets/javascripts/jquery.flot.errorbars.min.js app/assets/javascripts/jquery.flot.min.js app/assets/javascripts/stats.js app/assets/stylesheets/application.css app/assets/stylesheets/fonts.scss app/views/general/_stylesheet_includes.html.erb app/views/layouts/admin.html.erb app/views/layouts/default.html.erb app/views/public_body/statistics.html.erb config/application.rb config/environments/development.rb
| * | Update spec to match upgraded mail gem behaviour.Louise Crow2013-11-12-1/+1
| | | | | | | | | | | | | | | The new name value doesn't escape a double quote within single quotes, which seems more correct.
| * | Remove obsolete test.Louise Crow2013-11-12-88/+0
| | |
* | | Session keys are stored as strings in Rails 3.Louise Crow2013-11-18-28/+28
| |/ |/| | | | | Update our session-stripping code.