Skip to content

Commit

Permalink
Revert "Add more tests (#4970)"
Browse files Browse the repository at this point in the history
This reverts commit 05bf574.
  • Loading branch information
mracos committed Mar 25, 2019
1 parent 8753c6f commit 51edce6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 1 addition & 0 deletions lib/devise/models/database_authenticatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def password=(new_password)

# Verifies whether a password (ie from sign in) is the user password.
def valid_password?(password)
return false if password.blank?
Devise::Encryptor.compare(self.class, encrypted_password, password)
end

Expand Down
10 changes: 0 additions & 10 deletions test/models/database_authenticatable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,6 @@ def setup
refute user.valid_password?('654321')
end

test 'should be invalid if the password is nil' do
user = new_user(password: nil)
refute user.valid_password?(nil)
end

test 'should be invalid if the password is blank' do
user = new_user(password: '')
refute user.valid_password?('')
end

test 'should respond to current password' do
assert new_user.respond_to?(:current_password)
end
Expand Down

0 comments on commit 51edce6

Please sign in to comment.