FIX: redirect to original URL after social signup

This commit is contained in:
Vinoth Kannan
2018-09-05 00:46:54 +05:30
parent 4382fb5fac
commit d8b543bb67
4 changed files with 23 additions and 0 deletions

View File

@ -2571,6 +2571,18 @@ describe UsersController do
expect(response).to redirect_to("/")
end
context 'when cookies contains a destination URL' do
it 'should redirect to the URL' do
sign_in(Fabricate(:user))
destination_url = 'http://thisisasite.com/somepath'
cookies[:destination_url] = destination_url
get "/u/account-created"
expect(response).to redirect_to(destination_url)
end
end
context "when the user account is created" do
include ApplicationHelper