summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-06 13:24:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-06 13:24:30 +0000
commitdd1163b58a30285f5252fa18c41e935e154ab10e (patch)
tree8d77492521725e6c860d0a0c755f7ba3823a833a /test/unit
parent051794dffced6c68a10d113833b9c14eb936791d (diff)
downloadredmine-dd1163b58a30285f5252fa18c41e935e154ab10e.tar.gz
redmine-dd1163b58a30285f5252fa18c41e935e154ab10e.zip
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
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/mail_handler_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index 9230f4b0f..645a6f15f 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -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