From edaa33dee2ff2f7ea3fac488d41558eb5f86d68c Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 20 Jan 2022 09:16:11 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-7-stable-ee --- spec/helpers/application_settings_helper_spec.rb | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'spec/helpers/application_settings_helper_spec.rb') 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 } -- cgit v1.2.3