Commit d5458537 authored by marutosijp's avatar marutosijp

add test of email reminder in case of user language is 'auto' (#26247)

git-svn-id: https://svn.redmine.org/redmine/trunk@16682 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent c48eb20f
# 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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment