Mail handler: set mail_notification to only_my_events when creating a new user (#13341).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11590 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7cecd72faa
commit
bca9a8431e
|
@ -436,6 +436,7 @@ class MailHandler < ActionMailer::Base
|
||||||
user.lastname = '-' if user.lastname.blank?
|
user.lastname = '-' if user.lastname.blank?
|
||||||
user.language = Setting.default_language
|
user.language = Setting.default_language
|
||||||
user.generate_password = true
|
user.generate_password = true
|
||||||
|
user.mail_notification = 'only_my_events'
|
||||||
|
|
||||||
unless user.valid?
|
unless user.valid?
|
||||||
user.login = "user#{Redmine::Utils.random_hex(6)}" unless user.errors[:login].blank?
|
user.login = "user#{Redmine::Utils.random_hex(6)}" unless user.errors[:login].blank?
|
||||||
|
|
|
@ -768,6 +768,7 @@ class MailHandlerTest < ActiveSupport::TestCase
|
||||||
assert_equal expected[0], user.login
|
assert_equal expected[0], user.login
|
||||||
assert_equal expected[1], user.firstname
|
assert_equal expected[1], user.firstname
|
||||||
assert_equal expected[2], user.lastname
|
assert_equal expected[2], user.lastname
|
||||||
|
assert_equal 'only_my_events', user.mail_notification
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue