1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Bring back test removed by accident

This commit is contained in:
José Valim 2013-09-02 19:25:05 -03:00
parent 6b3b0c5e8c
commit 9464416c3e

View file

@ -62,6 +62,15 @@ class ConfirmationTest < ActionDispatch::IntegrationTest
end
end
test 'user should be redirected to a custom path after confirmation' do
Devise::ConfirmationsController.any_instance.stubs(:after_confirmation_path_for).returns("/?custom=1")
user = create_user(:confirm => false)
visit_user_confirmation_with_token(user.raw_confirmation_token)
assert_current_url "/?custom=1"
end
test 'already confirmed user should not be able to confirm the account again' do
user = create_user(:confirm => false)
user.confirmed_at = Time.now