diff options
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/secure_password_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activemodel/test/cases/secure_password_test.rb b/activemodel/test/cases/secure_password_test.rb index 7d7c51e6cb..62fffce233 100644 --- a/activemodel/test/cases/secure_password_test.rb +++ b/activemodel/test/cases/secure_password_test.rb @@ -33,6 +33,17 @@ class SecurePasswordTest < ActiveModel::TestCase assert @user.valid? end + test "too weak passwords" do + @user.password = "123456" + assert !@user.valid? + + @user.password = "password" + assert !@user.valid? + + @user.password = "d9034rfjlakj34RR$!!" + assert @user.valid? + end + test "authenticate" do @user.password = "secret" |