mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Don't confirm email after password reset.
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
This commit is contained in:
parent
b1754074e5
commit
052cbef205
3 changed files with 1 additions and 15 deletions
|
@ -228,11 +228,6 @@ module Devise
|
|||
generate_confirmation_token && save(:validate => false)
|
||||
end
|
||||
|
||||
def after_password_reset
|
||||
super
|
||||
confirm! unless confirmed?
|
||||
end
|
||||
|
||||
def postpone_email_change_until_confirmation_and_regenerate_confirmation_token
|
||||
@reconfirmation_required = true
|
||||
self.unconfirmed_email = self.email
|
||||
|
|
|
@ -6,7 +6,7 @@ class PasswordsControllerTest < ActionController::TestCase
|
|||
|
||||
setup do
|
||||
request.env["devise.mapping"] = Devise.mappings[:user]
|
||||
@user = create_user
|
||||
@user = create_user.tap(&:confirm!)
|
||||
@raw = @user.send_reset_password_instructions
|
||||
end
|
||||
|
||||
|
|
|
@ -236,15 +236,6 @@ class PasswordTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
end
|
||||
|
||||
test 'sign in user automatically and confirm after changing its password if it\'s not confirmed' do
|
||||
user = create_user(:confirm => false)
|
||||
request_forgot_password
|
||||
reset_password
|
||||
|
||||
assert warden.authenticated?(:user)
|
||||
assert user.reload.confirmed?
|
||||
end
|
||||
|
||||
test 'reset password request with valid E-Mail in XML format should return valid response' do
|
||||
create_user
|
||||
post user_password_path(:format => 'xml'), :user => {:email => "user@test.com"}
|
||||
|
|
Loading…
Reference in a new issue