summaryrefslogtreecommitdiffstats
path: root/test/unit/mail_handler_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-08 13:51:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-08 13:51:53 +0000
commitcc684803bac964114319a39d52fd12fc84864a02 (patch)
tree2f067186c8a15ea2fde523c36aa14aeefadc260b /test/unit/mail_handler_test.rb
parentd4ccce3c724a8b68fedfe701cb6e250acd3c8fe9 (diff)
downloadredmine-cc684803bac964114319a39d52fd12fc84864a02.tar.gz
redmine-cc684803bac964114319a39d52fd12fc84864a02.zip
Ignore emails received from the application emission address to avoid hell cycles (#4139).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3022 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mail_handler_test.rb')
-rw-r--r--test/unit/mail_handler_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index 9b6c28ba3..7e7dfa0c8 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -185,6 +185,13 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_equal false, submit_email('ticket_without_from_header.eml')
end
+ def test_should_ignore_emails_from_emission_address
+ Role.anonymous.add_permission!(:add_issues)
+ assert_no_difference 'User.count' do
+ assert_equal false, submit_email('ticket_from_emission_address.eml', :issue => {:project => 'ecookbook'}, :unknown_user => 'create')
+ end
+ end
+
def test_add_issue_should_send_email_notification
ActionMailer::Base.deliveries.clear
# This email contains: 'Project: onlinestore'