Actions
Defect #37449
closedPassing a wrong parameter to `with_settings` in UserTest::test_random_password_include_required_characters
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Setting.password_required_char_classes
stores an array like ["uppercase", "lowercase", "digits"]
but UserTest::test_random_password_include_required_characters
passes a hash.
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index dde1cdd62..53e7693ff 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -1099,7 +1099,7 @@ class UserTest < ActiveSupport::TestCase
end
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.random_password
assert u.valid?
Related issues
Actions