mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: add site setting allow_new_registrations which can be used to block all new account registrations
This commit is contained in:
@@ -148,6 +148,17 @@ describe InvitesController do
|
||||
|
||||
end
|
||||
|
||||
context 'new registrations are disabled' do
|
||||
let(:topic) { Fabricate(:topic) }
|
||||
let(:invite) { topic.invite_by_email(topic.user, "iceking@adventuretime.ooo") }
|
||||
before { SiteSetting.stubs(:allow_new_registrations).returns(false) }
|
||||
|
||||
it "doesn't redeem the invite" do
|
||||
Invite.any_instance.stubs(:redeem).never
|
||||
get :show, id: invite.invite_key
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context '.create_disposable_invite' do
|
||||
|
||||
Reference in New Issue
Block a user