Skip to content

Commit

Permalink
Fix: Save user authentication token after email confirmation (lynndyl…
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielbursztein2 committed Mar 30, 2020
1 parent 4a103ed commit 275da3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Expand Up @@ -13,6 +13,7 @@ def show

if signed_in?(resource_name)
token = signed_in_resource.create_token
signed_in_resource.save!

redirect_headers = build_redirect_headers(token.token,
token.client,
Expand Down
Expand Up @@ -53,6 +53,10 @@ def token_and_client_config_from(body)
assert @resource.confirmed?
end

test 'should save the authentication token' do
assert @resource.reload.tokens.present?
end

test 'should redirect to success url' do
assert_redirected_to(/^#{@redirect_url}/)
end
Expand Down

0 comments on commit 275da3c

Please sign in to comment.