mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
DEV: Clean up omniauth after mocking.
This commit is contained in:
parent
2bafd2a355
commit
123a22e6d8
@ -747,7 +747,10 @@ describe UsersController do
|
||||
|
||||
context 'authentication records for' do
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
||||
before do
|
||||
OmniAuth.config.test_mode = true
|
||||
|
||||
OmniAuth.config.mock_auth[:twitter] = OmniAuth::AuthHash.new(
|
||||
provider: 'twitter',
|
||||
uid: '123545',
|
||||
@ -762,6 +765,11 @@ describe UsersController do
|
||||
get "/auth/twitter/callback.json"
|
||||
end
|
||||
|
||||
after do
|
||||
Rails.application.env_config["omniauth.auth"] = OmniAuth.config.mock_auth[:twitter] = nil
|
||||
OmniAuth.config.test_mode = false
|
||||
end
|
||||
|
||||
it 'should create twitter user info if required' do
|
||||
post "/u.json", params: {
|
||||
name: "Test Osama",
|
||||
|
Loading…
Reference in New Issue
Block a user