summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-03-10 12:36:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-03-10 12:36:44 +0000
commit974863e8f4190cc4104d3314115c8f9add1b985a (patch)
tree5d3e5a101a03c545f0a36307bec9afc8c33b072a /test/unit
parent58af20746b2b0932fd809d6fa0685c5a4897dc67 (diff)
downloadredmine-974863e8f4190cc4104d3314115c8f9add1b985a.tar.gz
redmine-974863e8f4190cc4104d3314115c8f9add1b985a.zip
Merged r11525 from trunk (#11498).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@11581 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/mail_handler_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index bd30e5d3f..082715608 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -320,6 +320,22 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_same_elements [group1, group2], user.groups
end
+ def test_created_user_should_not_receive_account_information_with_no_account_info_option
+ assert_difference 'User.count' do
+ submit_email(
+ 'ticket_by_unknown_user.eml',
+ :issue => {:project => 'ecookbook'},
+ :unknown_user => 'create',
+ :no_account_notice => '1'
+ )
+ end
+
+ # only 1 email for the new issue notification
+ assert_equal 1, ActionMailer::Base.deliveries.size
+ email = ActionMailer::Base.deliveries.first
+ assert_include 'Ticket by unknown user', email.subject
+ end
+
def test_add_issue_without_from_header
Role.anonymous.add_permission!(:add_issues)
assert_equal false, submit_email('ticket_without_from_header.eml')