Skip to content

Add more tests#4970

Merged
tegon merged 1 commit intomasterfrom
let-add-missing-tests
Nov 13, 2018
Merged

Add more tests#4970
tegon merged 1 commit intomasterfrom
let-add-missing-tests

Conversation

@tegon
Copy link
Copy Markdown
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
@tegon tegon requested a review from feliperenan November 13, 2018 16:10
Copy link
Copy Markdown
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.

3 participants