diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-02-22 03:28:42 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-02-22 03:28:42 +0000 |
commit | f5c4607769b26f25c5113db28ea7d710ad5f2387 (patch) | |
tree | bbbda1c1f09d8abdc1a936a1dd5d78037f52215a /test/unit | |
parent | 77287d1f0bd1311957c0c36619d4b4a791b2ce15 (diff) | |
download | redmine-f5c4607769b26f25c5113db28ea7d710ad5f2387.tar.gz redmine-f5c4607769b26f25c5113db28ea7d710ad5f2387.zip |
use English as default language at "test_reminders_should_not_include_closed_issues" of unit mailer test
On Rails 3.1.3, test fails and output is not English.
<pre>
Error: test_reminders_should_not_include_closed_issues(MailerTest)
ActiveRecord::RecordInvalid: Validation failed: Tracker non รจ incluso nella lista
test/unit/mailer_test.rb:459:in `test_reminders_should_not_include_closed_issues'
</pre>
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8918 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/mailer_test.rb | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index b99d50cbf..b48aef567 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -452,14 +452,18 @@ class MailerTest < ActiveSupport::TestCase end def test_reminders_should_not_include_closed_issues - Issue.generate!(:project_id => 1, :tracker_id => 1, :status_id => 5, :subject => 'Closed issue', :assigned_to_id => 3, :due_date => 5.days.from_now) - ActionMailer::Base.deliveries.clear + with_settings :default_language => 'en' do + Issue.generate!(:project_id => 1, :tracker_id => 1, :status_id => 5, + :subject => 'Closed issue', :assigned_to_id => 3, + :due_date => 5.days.from_now) + ActionMailer::Base.deliveries.clear - Mailer.reminders(:days => 42) - assert_equal 1, ActionMailer::Base.deliveries.size - mail = ActionMailer::Base.deliveries.last - assert mail.bcc.include?('dlopper@somenet.foo') - assert !mail.body.include?('Closed issue') + Mailer.reminders(:days => 42) + assert_equal 1, ActionMailer::Base.deliveries.size + mail = ActionMailer::Base.deliveries.last + assert mail.bcc.include?('dlopper@somenet.foo') + assert !mail.body.include?('Closed issue') + end end def test_reminders_for_users |