Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more tests #4970

Merged
merged 1 commit into from Nov 13, 2018
Merged

Add more tests #4970

merged 1 commit into from Nov 13, 2018

Conversation

tegon
Copy link
Member

@tegon tegon commented Nov 13, 2018

After merging #4261, I realized that we could add a couple more tests, to ensure the new behavior added to #valid_password? - which is that it should return false when the password is either nil or blank ("").
I've also removed this condition because it's already present at Devise::Encryptor module in the .compare method.

After merging #4261, I realized that we could add a couple more
tests, to ensure the new behavior added to `#valid_password?` - which is
that it should return `false` when the password is either `nil` or blank
('').
I've also removed [this
condition](https://github.com/plataformatec/devise/blob/master/lib/devise/models/database_authenticatable.rb#L68)
because it's already present at `Devise::Encryptor` module in the
`.compare`
[method](https://github.com/plataformatec/devise/blob/master/lib/devise/encryptor.rb#L15).
@tegon tegon self-assigned this Nov 13, 2018
Copy link
Collaborator

@feliperenan feliperenan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tegon tegon merged commit 05bf574 into master Nov 13, 2018
@tegon tegon deleted the let-add-missing-tests branch November 13, 2018 17:29
mracos added a commit that referenced this pull request Mar 25, 2019
mracos added a commit that referenced this pull request Mar 26, 2019
mracos added a commit that referenced this pull request Mar 26, 2019
tegon added a commit that referenced this pull request Mar 26, 2019
…d-password-to-nil-if-password-is-nil

Reverts both "[#4245] Allow password to nil (#4261)" and "Add more tests (#4970)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants