mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 00:20:54 +08:00
This reverts commit beaeb0c4b2ba0d273d7707d2fbc79feb63083a81.
This commit is contained in:
@ -269,30 +269,6 @@ RSpec.describe Users::OmniauthCallbacksController do
|
||||
expect(user.email_confirmed?).to eq(true)
|
||||
end
|
||||
|
||||
it 'should return the authenticated response with the correct path for subfolders' do
|
||||
set_subfolder "/forum"
|
||||
events = DiscourseEvent.track_events do
|
||||
get "/auth/google_oauth2/callback.json"
|
||||
end
|
||||
|
||||
expect(response.headers["Set-Cookie"].match(/^authentication_data=.*; path=\/forum/)).not_to eq(nil)
|
||||
|
||||
expect(events.map { |event| event[:event_name] }).to include(:user_logged_in, :user_first_logged_in)
|
||||
|
||||
expect(response.status).to eq(302)
|
||||
|
||||
data = JSON.parse(response.cookies["authentication_data"])
|
||||
|
||||
expect(data["authenticated"]).to eq(true)
|
||||
expect(data["awaiting_activation"]).to eq(false)
|
||||
expect(data["awaiting_approval"]).to eq(false)
|
||||
expect(data["not_allowed_from_ip_address"]).to eq(false)
|
||||
expect(data["admin_not_allowed_from_ip_address"]).to eq(false)
|
||||
|
||||
user.reload
|
||||
expect(user.email_confirmed?).to eq(true)
|
||||
end
|
||||
|
||||
it "should confirm email even when the tokens are expired" do
|
||||
user.email_tokens.update_all(confirmed: false, expired: true)
|
||||
|
||||
|
Reference in New Issue
Block a user