summaryrefslogtreecommitdiff
path: root/spec/helpers/application_settings_helper_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/application_settings_helper_spec.rb')
-rw-r--r--spec/helpers/application_settings_helper_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/helpers/application_settings_helper_spec.rb b/spec/helpers/application_settings_helper_spec.rb
index 7f25721801f..479e2d7ef9d 100644
--- a/spec/helpers/application_settings_helper_spec.rb
+++ b/spec/helpers/application_settings_helper_spec.rb
@@ -166,4 +166,32 @@ RSpec.describe ApplicationSettingsHelper do
it { is_expected.to eq(false) }
end
end
+
+ describe '.signup_enabled?' do
+ subject { helper.signup_enabled? }
+
+ context 'when signup is enabled' do
+ before do
+ stub_application_setting(signup_enabled: true)
+ end
+
+ it { is_expected.to be true }
+ end
+
+ context 'when signup is disabled' do
+ before do
+ stub_application_setting(signup_enabled: false)
+ end
+
+ it { is_expected.to be false }
+ end
+
+ context 'when `signup_enabled` is nil' do
+ before do
+ stub_application_setting(signup_enabled: nil)
+ end
+
+ it { is_expected.to be false }
+ end
+ end
end