mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 11:01:11 +08:00
Disable OmniAuth account creation if 'invite only'
This commit is contained in:
@ -32,6 +32,17 @@ describe Users::OmniauthCallbacksController do
|
||||
response.should be_success
|
||||
end
|
||||
|
||||
context "when 'invite only' site setting is enabled" do
|
||||
before { SiteSetting.stubs(:invite_only?).returns(true) }
|
||||
|
||||
it 'informs the user they are awaiting approval' do
|
||||
xhr :get, :complete, provider: 'twitter', format: :json
|
||||
|
||||
expect(
|
||||
JSON.parse(response.body)['awaiting_approval']
|
||||
).to be_true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'facebook' do
|
||||
|
Reference in New Issue
Block a user