aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/test/cases')
-rw-r--r--activemodel/test/cases/secure_password_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activemodel/test/cases/secure_password_test.rb b/activemodel/test/cases/secure_password_test.rb
index 5d788d7a1e..2c3da2c93e 100644
--- a/activemodel/test/cases/secure_password_test.rb
+++ b/activemodel/test/cases/secure_password_test.rb
@@ -17,6 +17,11 @@ class SecurePasswordTest < ActiveModel::TestCase
assert_equal %w( pass ), User.weak_passwords
end
+ test "specifying the list of passwords in the class" do
+ User.send(:set_weak_passwords, ['pass'])
+ assert_equal %w( pass ), User.weak_passwords
+ end
+
test "adding to the list of passwords" do
User.weak_passwords << 'pass'
@user.password = "password"