1
0
Fork 0
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:
Andri Möll 2013-08-15 14:17:11 +03:00 committed by José Valim
parent b1754074e5
commit 052cbef205
3 changed files with 1 additions and 15 deletions

View file

@ -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

View file

@ -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

View file

@ -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"}