Makes the mail handler ignore out-of-office emails (#10607).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9358 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-04-06 13:24:30 +00:00
parent 051794dffc
commit dd1163b58a
2 changed files with 16 additions and 0 deletions
+9
View File
@@ -359,6 +359,15 @@ class MailHandlerTest < ActiveSupport::TestCase
end
end
def test_should_ignore_oof_emails
raw = IO.read(File.join(FIXTURES_PATH, 'ticket_on_given_project.eml'))
raw = "X-Auto-Response-Suppress: OOF\n" + raw
assert_no_difference 'Issue.count' do
assert_equal false, MailHandler.receive(raw)
end
end
def test_add_issue_should_send_email_notification
Setting.notified_events = ['issue_added']
ActionMailer::Base.deliveries.clear