diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-07-02 16:13:18 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-07-02 16:13:18 +0000 |
commit | 4b55bb913c48db9ccd1413875f52ea4b5e21a503 (patch) | |
tree | dd08f65d0b96b5119b1939492341f874d3cff31a /test | |
parent | f6abc06eeea40c69896709c08f4ade4277280d78 (diff) | |
download | redmine-4b55bb913c48db9ccd1413875f52ea4b5e21a503.tar.gz redmine-4b55bb913c48db9ccd1413875f52ea4b5e21a503.zip |
only ignore undesirable Auto-Submitted headers defined in RFC3834 (#16190)
Contributed by Felix Schäfer.
git-svn-id: http://svn.redmine.org/redmine/trunk@13206 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/mail_handler_test.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 507ca1e85..6c3aefc41 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -637,8 +637,7 @@ class MailHandlerTest < ActiveSupport::TestCase "X-Auto-Response-Suppress: OOF", "Auto-Submitted: auto-replied", "Auto-Submitted: Auto-Replied", - "Auto-Submitted: auto-generated", - "Auto-Submitted: auto-forwarded" + "Auto-Submitted: auto-generated" ].each do |header| raw = IO.read(File.join(FIXTURES_PATH, 'ticket_on_given_project.eml')) raw = header + "\n" + raw @@ -649,6 +648,19 @@ class MailHandlerTest < ActiveSupport::TestCase end end + test "should not ignore Auto-Submitted headers not defined in RFC3834" do + [ + "Auto-Submitted: auto-forwarded" + ].each do |header| + raw = IO.read(File.join(FIXTURES_PATH, 'ticket_on_given_project.eml')) + raw = header + "\n" + raw + + assert_difference 'Issue.count', 1 do + assert_not_nil MailHandler.receive(raw), "email with #{header} header was ignored" + end + end + end + def test_add_issue_should_send_email_notification Setting.notified_events = ['issue_added'] ActionMailer::Base.deliveries.clear |