diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/mailer_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 3c2f0e49e..a97c3e27b 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -1,3 +1,5 @@ +# encoding: utf-8 +# # Redmine - project management software # Copyright (C) 2006-2016 Jean-Philippe Lang # @@ -600,6 +602,19 @@ class MailerTest < ActiveSupport::TestCase assert_equal '1 issue(s) due in the next 42 days', mail.subject end + def test_reminders_language_auto + with_settings :default_language => 'fr' do + user = User.find(3) + user.update_attribute :language, '' + Mailer.reminders(:days => 42) + assert_equal 1, ActionMailer::Base.deliveries.size + mail = last_email + assert mail.bcc.include?('dlopper@somenet.foo') + assert_mail_body_match 'Bug #3: Error 281 when updating a recipe', mail + assert_equal "1 demande(s) arrivent à échéance (42)", mail.subject + end + end + def test_reminders_should_not_include_closed_issues with_settings :default_language => 'en' do Issue.create!(:project_id => 1, :tracker_id => 1, :status_id => 5, |