mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:57:25 +08:00
FIX: redirect to original URL after social signup
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user