diff options
author | Vladimir Kiselev <nettsundere@gmail.com> | 2013-06-26 04:46:21 +0400 |
---|---|---|
committer | Vladimir Kiselev <nettsundere@gmail.com> | 2013-07-24 03:14:15 +0400 |
commit | 3be0cdfa55cadf35f7625e055fad9999d064c827 (patch) | |
tree | a461dfbad843c0dd8e600b4015b8a55f349bd683 /activemodel/test/cases | |
parent | f38b5444428f418c4e6377bbb40d7518ea0c61a7 (diff) | |
download | rails-3be0cdfa55cadf35f7625e055fad9999d064c827.tar.gz rails-3be0cdfa55cadf35f7625e055fad9999d064c827.tar.bz2 rails-3be0cdfa55cadf35f7625e055fad9999d064c827.zip |
Fix secure_password password_confirmation validations
Diffstat (limited to 'activemodel/test/cases')
-rw-r--r-- | activemodel/test/cases/secure_password_test.rb | 5 |
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 0b900d934d..98e5c747d5 100644 --- a/activemodel/test/cases/secure_password_test.rb +++ b/activemodel/test/cases/secure_password_test.rb @@ -95,6 +95,11 @@ class SecurePasswordTest < ActiveModel::TestCase assert @user.valid?(:update), "user should be valid" end + test "password_confirmation validations will not be triggered if password_confirmation is not sent" do + @user.password = "password" + assert @user.valid?(:create) + end + test "will not save if confirmation is blank but password is not" do @user.password = "password" @user.password_confirmation = "" |