aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
Commit message (Collapse)AuthorAgeLines
* Merge branch 'release/0.11'0.11.0.3Louise Crow2013-06-04-951/+115
|\
| * Parse the 'to' address as if on a real mail to trigger quoted string encoding.Louise Crow2013-06-03-0/+8
| |
| * When extracting attachments for an incoming message and getting the body of ↵Louise Crow2013-05-29-0/+43
| | | | | | | | the main part in order to look for uuencoded text, make sure that we're getting that main part from the reparsed attachments, and not getting an obsolete attachment. Fixes #958.
| * Remove erroneous test nameLouise Crow2013-05-28-1/+1
| |
| * Avoid an FoiAttachment validation failure under Rails 3Mark Longair2013-05-16-0/+11
| | | | | | | | | | | | | | | | | | | | | | Under Rails 3, the uudecoded FoiAttachment in this test fails validation at the self.save! in IncomingMessage.parse_raw_email, although the FoiAttachment has been correctly created and saved to the database in _uudecode_and_save_attachments. Forcing a reload=true on self.foi_attachments fixes this. Thanks to Louise Crow for finding the fix for this problem.
| * Add a new example for unconvertible-to-UTF-8 text part dataMark Longair2013-05-16-2/+9
| | | | | | | | | | | | | | | | | | | | | | The example file that was used for checking for text attachment data which could not be converted to UTF-8 is one that we *can* actually deal with by guessing the character set, since it's valid GB18030. So, this commit changes that test to check for the first few Chinese characters in that email, and introduces a replacement test with text from /dev/random, which should not be interpretable in any sensible way.
| * Merge remote-tracking branch 'mysociety/develop' into rails-3-developHenare Degan2013-03-14-6/+7
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock app/controllers/admin_request_controller.rb app/controllers/admin_track_controller.rb app/controllers/request_controller.rb app/controllers/services_controller.rb app/helpers/link_to_helper.rb app/mailers/request_mailer.rb app/models/application_mailer.rb app/models/info_request.rb app/views/admin_censor_rule/edit.html.erb app/views/admin_censor_rule/new.html.erb app/views/admin_public_body/_form.html.erb app/views/admin_public_body/_locale_selector.html.erb app/views/admin_public_body/_one_list.html.erb app/views/admin_public_body/edit.html.erb app/views/admin_public_body/list.html.erb app/views/admin_public_body/new.html.erb app/views/admin_request/_incoming_message_actions.html.erb app/views/admin_request/edit.html.erb app/views/admin_request/edit_comment.html.erb app/views/admin_request/edit_outgoing.html.erb app/views/admin_request/list.html.erb app/views/admin_request/list_old_unclassified.html.erb app/views/admin_request/show.html.erb app/views/admin_track/_some_tracks.html.erb app/views/admin_track/list.html.erb app/views/admin_user/edit.html.erb app/views/admin_user/list.html.erb app/views/admin_user/show.html.erb app/views/general/_footer.html.erb app/views/general/exception_caught.html.erb app/views/help/contact.html.erb app/views/layouts/default.html.erb app/views/public_body/_alphabet.html.erb app/views/request/_request_listing_single.html.erb app/views/request/_sidebar.html.erb app/views/request/new.html.erb app/views/request/show.html.erb app/views/request_mailer/external_response.rhtml app/views/request_mailer/fake_response.rhtml config/environment.rb config/environments/production.rb config/routes.rb spec/controllers/admin_censor_rule_controller_spec.rb spec/controllers/request_controller_spec.rb spec/controllers/track_controller_spec.rb spec/helpers/link_to_helper_spec.rb spec/mailers/request_mailer_spec.rb spec/models/info_request_spec.rb spec/spec_helper.rb spec/views/public_body/show.html.erb_spec.rb spec/views/request/show.html.erb_spec.rb vendor/plugins/rails_xss/lib/rails_xss/erubis.rb
| * | Reload cached object after extracting attachmentsHenare Degan2013-03-04-0/+1
| | |
| * | Rename Configuration class to avoid conflict with ActiveSupport::ConfigurableHenare Degan2013-03-03-6/+6
| | |
| * | Mailers have their own home in Rails 3Henare Degan2013-02-25-871/+0
| | |
| * | and_return with should_not_receive is deprecated. Fixes #826Henare Degan2013-02-25-2/+2
| | |
| * | Mocking and stubbing work a bit differently, this allows the test to runHenare Degan2013-02-08-1/+1
| | |
| * | Add a test that exposes a problem we have with renaming attributesHenare Degan2013-02-07-0/+8
| | |
| * | Move over to rails 3 mail api because there appear to be problems with ↵Matthew Landauer2013-02-01-1/+1
| | | | | | | | | | | | sending attachments
| * | Merge branch 'i18n_rails3_preparation' into rails-3-spikeMatthew Landauer2013-01-31-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock app/controllers/general_controller.rb app/controllers/public_body_controller.rb spec/controllers/public_body_controller_spec.rb
| | * | Set locale with I18n rather than through globalizeMatthew Landauer2013-01-17-3/+3
| | | |
| * | | Calling TMail::Mail#base64_decode does not modify the mail object so doesn't ↵Matthew Landauer2013-01-28-1/+1
| | | | | | | | | | | | | | | | do anything as used here
| * | | Merge branch 'rails_xss' into rails-3-spikeMatthew Landauer2013-01-25-1/+19
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock config/environment.rb lib/i18n_fixes.rb
| * | | Fixes to ApplicationMailer tests in Rails 3Matthew Landauer2013-01-23-15/+11
| | | |
| * | | Fix deprecation warningsHenare Degan2013-01-23-3/+3
| | | | | | | | | | | | | | | | | | | | * Errors#on have been deprecated * Errors#[] now always returns an Array
| * | | Change syntax - this looks like a test to meHenare Degan2013-01-23-1/+1
| | | |
| * | | In 447e4af we started adding the error to each attribute so start testing eachHenare Degan2013-01-23-4/+10
| | | |
| * | | Merge remote-tracking branch 'mysociety/develop' into rails-3-spikeMatthew Landauer2013-01-04-24/+32
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock Rakefile app/controllers/request_controller.rb lib/tasks/rspec.rake spec/controllers/services_controller_spec.rb spec/spec_helper.rb spec/views/request/_after_actions.rhtml_spec.rb
| * | | | The run_callbacks API has changedHenare Degan2012-12-12-1/+1
| | | | | | | | | | | | | | | | | | | | https://rails.lighthouseapp.com/projects/8994/tickets/5472-unable-to-manually-run-activerecord-object-callbacks
| * | | | Update to new RSpec module namesHenare Degan2012-12-12-1/+1
| | | | |
| * | | | safe_mock_model doesn't seem to be needed, also tested in Ruby 1.9Henare Degan2012-12-12-12/+12
| | | | |
| * | | | The with_locale has been removed in Globalize3Henare Degan2012-12-11-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think Globalize is supposed to pick up the locale from I18n anyway so I don't know if these are needed. I think I still haven't done the right thing but it's time to move on.
| * | | | Switch to new method nameHenare Degan2012-12-11-3/+3
| | | | |
* | | | | Use class instead of type - type is removed in Ruby 1.90.9.0.6hotfix/0.9.0.6Louise Crow2013-05-28-1/+1
| | | | |
* | | | | Return a string from user.name always to avoid any complications with other ↵hotfix/0.9.0.5Louise Crow2013-05-28-3/+14
| | | | | | | | | | | | | | | | | | | | functions calling gsub on the result. SafeBuffer won't work with gsub until Rails 3.2 https://github.com/rails/rails/commit/b4a6e2f8442ceda118367f9a61c38af754be1cbf
* | | | | Bugfix for the case where a suspended user sends a contact message. Their ↵hotfix/0.9.0.2Louise Crow2013-05-07-1/+15
| | | | | | | | | | | | | | | | | | | | name (with the '(account suspended)' suffix) is marked by the translation call as HTML safe, so escapes the angled brackets when they are appended to it in the contact mailer code. Use string interpolation instead.
* | | | | Set locale with I18n rather than through globalizeMatthew Landauer2013-04-02-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: app/controllers/general_controller.rb
* | | | | When force_ssl is true make links in emails httpsMatthew Landauer2013-04-02-7/+22
| |_|_|/ |/| | |
* | | | Merge remote-tracking branch ↵Louise Crow2013-03-13-6/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'openaustralia_github/one_support_email_on_admin_attention_state' into develop Conflicts: Gemfile.lock app/controllers/request_controller.rb app/models/request_mailer.rb app/views/admin_general/index.rhtml spec/models/request_mailer_spec.rb
| * | | | Add optional message to requires_admin emailMatthew Landauer2013-03-02-0/+5
| | | | |
| * | | | InfoRequestEvent should know about its event typesMatthew Landauer2013-03-02-2/+2
| | | | |
| * | | | Inline methodMatthew Landauer2013-03-02-4/+4
| | | | |
* | | | | Merge remote-tracking branch 'openaustralia_github/make-links-relative' into ↵Louise Crow2013-03-06-12/+0
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | develop Conflicts: app/controllers/admin_request_controller.rb app/models/request_mailer.rb app/views/admin_general/index.rhtml app/views/admin_general/stats.rhtml app/views/admin_public_body/_one_list.rhtml app/views/admin_public_body/_tags.rhtml app/views/admin_public_body/show.rhtml app/views/admin_request/show.rhtml app/views/admin_user/show.rhtml app/views/layouts/admin.rhtml app/views/public_body/show.rhtml app/views/request/new.rhtml
| * | | | Stop using admin_url to generate absolute url for the admin interfaceMatthew Landauer2013-02-15-12/+0
| | | | |
* | | | | Add magic encoding line.Louise Crow2013-02-16-0/+1
| | | | |
* | | | | Clear purge requests in the setup of tests that count them.Louise Crow2013-02-16-4/+5
| | | | |
* | | | | Fix for #808. SafeBuffer and ActionMailer::Quoting.quoted_printable don't ↵Louise Crow2013-02-15-0/+21
|/ / / / | | | | | | | | | | | | play well together, so convert all subject lines to strings before passing them off to actionmailer.
* | | / Calling TMail::Mail#base64_decode does not modify the mail object so doesn't ↵Matthew Landauer2013-01-28-1/+1
| |_|/ |/| | | | | | | | do anything as used here
* | | As we're validating filename with validates_presence_of, which doesn't allow ↵Louise Crow2013-01-14-1/+12
| | | | | | | | | | | | blanks, ensure_filename! should populate a default filename on a blank filename, as well as on nil.
* | | Handle case where info request doesn't have a user_nameLouise Crow2013-01-07-0/+7
| |/ |/|
* | Wrap specs on the extraction of RFC-822 headers in code that sets the ENV ↵Louise Crow2012-12-11-24/+32
|/ | | | timezone. TMail renders headers using localtime, which is not ideal, but we're migrating away from it anyway, so I'm not sure it's worth delving into the internals of TMail to fix it.
* Convert url in comment to spec.Louise Crow2012-12-06-0/+8
| | | | | | Conflicts: lib/mail_handler/backends/tmail_backend.rb
* Rename _get_attachment_text_internal_one_file to ↵Louise Crow2012-12-06-2/+2
| | | | get_attachment_text_one_file as it is now an externally-accessed method of the mail handler module.
* Move methods for getting the text out of attachments to the mail handler module.Louise Crow2012-12-06-24/+3
|
* Add spec for handling an RFC822 attachment.Louise Crow2012-12-04-0/+18
| | | | | | Conflicts: spec/models/incoming_message_spec.rb