diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2014-08-07 16:10:20 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2014-08-07 16:10:20 -0700 |
commit | 089661b69ad055cab68ea860c085c7f852da3972 (patch) | |
tree | a39fe35f3c399b199bdca8490724b451761a1cba /activemodel/test/cases/secure_password_test.rb | |
parent | cc1de71bfaced172fe00a66fd381da69d9528e8b (diff) | |
parent | e81453ef92b37156dafc092093106c8e8b87b268 (diff) | |
download | rails-089661b69ad055cab68ea860c085c7f852da3972.tar.gz rails-089661b69ad055cab68ea860c085c7f852da3972.tar.bz2 rails-089661b69ad055cab68ea860c085c7f852da3972.zip |
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'activemodel/test/cases/secure_password_test.rb')
-rw-r--r-- | activemodel/test/cases/secure_password_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activemodel/test/cases/secure_password_test.rb b/activemodel/test/cases/secure_password_test.rb index 6b21bc68fa..6d56c8344a 100644 --- a/activemodel/test/cases/secure_password_test.rb +++ b/activemodel/test/cases/secure_password_test.rb @@ -40,6 +40,11 @@ class SecurePasswordTest < ActiveModel::TestCase assert @user.valid?(:create), 'user should be valid' end + test "create a new user with validation and a spaces only password" do + @user.password = ' ' * 72 + assert @user.valid?(:create), 'user should be valid' + end + test "create a new user with validation and a blank password" do @user.password = '' assert !@user.valid?(:create), 'user should be invalid' @@ -105,6 +110,11 @@ class SecurePasswordTest < ActiveModel::TestCase assert @existing_user.valid?(:update), 'user should be valid' end + test "updating an existing user with validation and a spaces only password" do + @user.password = ' ' * 72 + assert @user.valid?(:update), 'user should be valid' + end + test "updating an existing user with validation and a blank password and password_confirmation" do @existing_user.password = '' @existing_user.password_confirmation = '' |