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
This commit is contained in:
parent
77287d1f0b
commit
f5c4607769
|
@ -452,14 +452,18 @@ class MailerTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_reminders_should_not_include_closed_issues
|
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)
|
with_settings :default_language => 'en' do
|
||||||
ActionMailer::Base.deliveries.clear
|
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)
|
Mailer.reminders(:days => 42)
|
||||||
assert_equal 1, ActionMailer::Base.deliveries.size
|
assert_equal 1, ActionMailer::Base.deliveries.size
|
||||||
mail = ActionMailer::Base.deliveries.last
|
mail = ActionMailer::Base.deliveries.last
|
||||||
assert mail.bcc.include?('dlopper@somenet.foo')
|
assert mail.bcc.include?('dlopper@somenet.foo')
|
||||||
assert !mail.body.include?('Closed issue')
|
assert !mail.body.include?('Closed issue')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_reminders_for_users
|
def test_reminders_for_users
|
||||||
|
|
Loading…
Reference in New Issue