Use User#generate_password in MailHandler.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11457 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-02-23 16:57:45 +00:00
parent fac4a79d4c
commit e14caf8e33
3 changed files with 15 additions and 11 deletions
-8
View File
@@ -726,14 +726,6 @@ class MailHandlerTest < ActiveSupport::TestCase
end
end
def test_new_user_from_attributes_should_respect_minimum_password_length
with_settings :password_min_length => 15 do
user = MailHandler.new_user_from_attributes('jsmith@example.net')
assert user.valid?
assert user.password.length >= 15
end
end
def test_new_user_from_attributes_should_use_default_login_if_invalid
user = MailHandler.new_user_from_attributes('foo+bar@example.net')
assert user.valid?