mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 12:17:28 +02:00
Mail handler: adds --no-notification option to disable notifications to the created user (#13341).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11526 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -336,6 +336,19 @@ class MailHandlerTest < ActiveSupport::TestCase
|
||||
assert_include 'Ticket by unknown user', email.subject
|
||||
end
|
||||
|
||||
def test_created_user_should_have_mail_notification_to_none_with_no_notification_option
|
||||
assert_difference 'User.count' do
|
||||
submit_email(
|
||||
'ticket_by_unknown_user.eml',
|
||||
:issue => {:project => 'ecookbook'},
|
||||
:unknown_user => 'create',
|
||||
:no_notification => '1'
|
||||
)
|
||||
end
|
||||
user = User.order('id DESC').first
|
||||
assert_equal 'none', user.mail_notification
|
||||
end
|
||||
|
||||
def test_add_issue_without_from_header
|
||||
Role.anonymous.add_permission!(:add_issues)
|
||||
assert_equal false, submit_email('ticket_without_from_header.eml')
|
||||
|
||||
Reference in New Issue
Block a user