Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/current_settings_spec.rb')
-rw-r--r--spec/lib/gitlab/current_settings_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/lib/gitlab/current_settings_spec.rb b/spec/lib/gitlab/current_settings_spec.rb
index 01aceec12c5..f5cb1987c5c 100644
--- a/spec/lib/gitlab/current_settings_spec.rb
+++ b/spec/lib/gitlab/current_settings_spec.rb
@@ -24,6 +24,26 @@ RSpec.describe Gitlab::CurrentSettings do
end
end
+ describe '.signup_disabled?' do
+ subject { described_class.signup_disabled? }
+
+ context 'when signup is enabled' do
+ before do
+ create(:application_setting, signup_enabled: true)
+ end
+
+ it { is_expected.to be_falsey }
+ end
+
+ context 'when signup is disabled' do
+ before do
+ create(:application_setting, signup_enabled: false)
+ end
+
+ it { is_expected.to be_truthy }
+ end
+ end
+
describe '#current_application_settings', :use_clean_rails_memory_store_caching do
it 'allows keys to be called directly' do
db_settings = create(:application_setting,