diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /spec/helpers/application_settings_helper_spec.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'spec/helpers/application_settings_helper_spec.rb')
-rw-r--r-- | spec/helpers/application_settings_helper_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/helpers/application_settings_helper_spec.rb b/spec/helpers/application_settings_helper_spec.rb index 3c2ac954fe5..e722f301522 100644 --- a/spec/helpers/application_settings_helper_spec.rb +++ b/spec/helpers/application_settings_helper_spec.rb @@ -253,6 +253,32 @@ RSpec.describe ApplicationSettingsHelper do end end + describe '.registration_features_can_be_prompted?' do + subject { helper.registration_features_can_be_prompted? } + + before do + if Gitlab.ee? + allow(License).to receive(:current).and_return(nil) + end + end + + context 'when service ping is enabled' do + before do + stub_application_setting(usage_ping_enabled: true) + end + + it { is_expected.to be_falsey } + end + + context 'when service ping is disabled' do + before do + stub_application_setting(usage_ping_enabled: false) + end + + it { is_expected.to be_truthy } + end + end + describe '#sidekiq_job_limiter_modes_for_select' do subject { helper.sidekiq_job_limiter_modes_for_select } |