mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
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
This commit is contained in:
parent
a528fc07f3
commit
04fa679cb8
@ -1,3 +1,5 @@
|
|||||||
|
# encoding: utf-8
|
||||||
|
#
|
||||||
# Redmine - project management software
|
# Redmine - project management software
|
||||||
# Copyright (C) 2006-2016 Jean-Philippe Lang
|
# 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
|
assert_equal '1 issue(s) due in the next 42 days', mail.subject
|
||||||
end
|
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
|
def test_reminders_should_not_include_closed_issues
|
||||||
with_settings :default_language => 'en' do
|
with_settings :default_language => 'en' do
|
||||||
Issue.create!(:project_id => 1, :tracker_id => 1, :status_id => 5,
|
Issue.create!(:project_id => 1, :tracker_id => 1, :status_id => 5,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user