Fix passing a wrong parameter to with_settings in UserTest::test_random_password_include_required_characters (#37449).

Patch by Go MAEDA.


git-svn-id: https://svn.redmine.org/redmine/trunk@21705 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2022-07-16 05:31:41 +00:00
parent adfef93c66
commit 0ef56a4bfb

View File

@@ -1099,7 +1099,7 @@ class UserTest < ActiveSupport::TestCase
end end
def test_random_password_include_required_characters def test_random_password_include_required_characters
with_settings :password_required_char_classes => Setting::PASSWORD_CHAR_CLASSES do with_settings :password_required_char_classes => Setting::PASSWORD_CHAR_CLASSES.keys do
u = User.new(:firstname => "new", :lastname => "user", :login => "random", :mail => "random@somnet.foo") u = User.new(:firstname => "new", :lastname => "user", :login => "random", :mail => "random@somnet.foo")
u.random_password u.random_password
assert u.valid? assert u.valid?