mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Fix spelling error, 'reseting' to 'resetting'
This commit is contained in:
parent
e4987e8bb7
commit
804fbdf6d5
2 changed files with 6 additions and 6 deletions
|
@ -34,14 +34,14 @@ class Devise::PasswordsController < DeviseController
|
|||
flash_message = resource.active_for_authentication? ? :updated : :updated_not_active
|
||||
set_flash_message(:notice, flash_message) if is_navigational_format?
|
||||
sign_in(resource_name, resource)
|
||||
respond_with resource, :location => after_reseting_password_path_for(resource)
|
||||
respond_with resource, :location => after_resetting_password_path_for(resource)
|
||||
else
|
||||
respond_with resource
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
def after_reseting_password_path_for(resource)
|
||||
def after_resetting_password_path_for(resource)
|
||||
after_sign_in_path_for(resource)
|
||||
end
|
||||
|
||||
|
|
|
@ -14,15 +14,15 @@ class PasswordsControllerTest < ActionController::TestCase
|
|||
put :update, "user"=>{"reset_password_token"=>@user.reset_password_token, "password"=>"123456", "password_confirmation"=>"123456"}
|
||||
end
|
||||
|
||||
test 'redirect to after_sign_in_path_for if after_reseting_password_path_for is not overridden' do
|
||||
test 'redirect to after_sign_in_path_for if after_resetting_password_path_for is not overridden' do
|
||||
put_update_with_params
|
||||
assert_redirected_to "http://test.host/"
|
||||
end
|
||||
|
||||
test 'redirect accordingly if after_reseting_password_path_for is overridden' do
|
||||
test 'redirect accordingly if after_resetting_password_path_for is overridden' do
|
||||
custom_path = "http://custom.path/"
|
||||
# Overwrite after_reseting_password_path_for with custom_path
|
||||
Devise::PasswordsController.any_instance.stubs(:after_reseting_password_path_for).with(@user).returns(custom_path)
|
||||
# Overwrite after_resetting_password_path_for with custom_path
|
||||
Devise::PasswordsController.any_instance.stubs(:after_resetting_password_path_for).with(@user).returns(custom_path)
|
||||
put_update_with_params
|
||||
assert_redirected_to custom_path
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue