summaryrefslogtreecommitdiffstats
path: root/test/unit/mailer_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2017-06-23 16:46:05 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2017-06-23 16:46:05 +0000
commit04fa679cb81510cbf256c4964b3dbb2f906025e1 (patch)
tree0dc328c3ba4b7c3ae4bd1ad6a0cc38b2cc25ed44 /test/unit/mailer_test.rb
parenta528fc07f3653288730485fd996735ef681dafc5 (diff)
downloadredmine-04fa679cb81510cbf256c4964b3dbb2f906025e1.tar.gz
redmine-04fa679cb81510cbf256c4964b3dbb2f906025e1.zip
add test of email reminder in case of user language is 'auto' (#26247)
git-svn-id: http://svn.redmine.org/redmine/trunk@16682 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r--test/unit/mailer_test.rb15
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,