mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 04:13:53 +08:00
FIX: new sign-ups via google are added to groups
This fix ensures that users that are signing up via google oauth are automatically added to any groups. A similar fix will probably need to be added to other oauth providers.
This commit is contained in:
@ -82,4 +82,19 @@ describe Auth::GoogleOAuth2Authenticator do
|
||||
end
|
||||
end
|
||||
|
||||
context 'after_create_account' do
|
||||
it 'confirms email' do
|
||||
authenticator = Auth::GoogleOAuth2Authenticator.new
|
||||
user = Fabricate(:user)
|
||||
session = {
|
||||
:email_valid => "true",
|
||||
:extra_data => {
|
||||
:google_user_id => 1
|
||||
}
|
||||
}
|
||||
authenticator.after_create_account(user, session)
|
||||
expect(user.email_confirmed?).to eq(true)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user