diff options
Diffstat (limited to 'spec/models/project_ci_cd_setting_spec.rb')
-rw-r--r-- | spec/models/project_ci_cd_setting_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/project_ci_cd_setting_spec.rb b/spec/models/project_ci_cd_setting_spec.rb index 5a32e103e0f..2c490c33747 100644 --- a/spec/models/project_ci_cd_setting_spec.rb +++ b/spec/models/project_ci_cd_setting_spec.rb @@ -27,6 +27,24 @@ RSpec.describe ProjectCiCdSetting do end end + describe '#set_default_for_inbound_job_token_scope_enabled' do + context 'when feature flag ci_inbound_job_token_scope is enabled' do + before do + stub_feature_flags(ci_inbound_job_token_scope: true) + end + + it { is_expected.to be_inbound_job_token_scope_enabled } + end + + context 'when feature flag ci_inbound_job_token_scope is disabled' do + before do + stub_feature_flags(ci_inbound_job_token_scope: false) + end + + it { is_expected.not_to be_inbound_job_token_scope_enabled } + end + end + describe '#default_git_depth' do let(:default_value) { described_class::DEFAULT_GIT_DEPTH } |