diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/tooling/danger/feature_flag_spec.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/tooling/danger/feature_flag_spec.rb')
-rw-r--r-- | spec/tooling/danger/feature_flag_spec.rb | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/spec/tooling/danger/feature_flag_spec.rb b/spec/tooling/danger/feature_flag_spec.rb index 5e495cd43c6..7cae3e0a8b3 100644 --- a/spec/tooling/danger/feature_flag_spec.rb +++ b/spec/tooling/danger/feature_flag_spec.rb @@ -10,7 +10,7 @@ RSpec.describe Tooling::Danger::FeatureFlag do let(:fake_danger) { DangerSpecHelper.fake_danger.include(described_class) } - subject(:feature_flag) { fake_danger.new(git: fake_git) } + subject(:feature_flag) { fake_danger.new(helper: fake_helper) } describe '#feature_flag_files' do let(:feature_flag_files) do @@ -87,7 +87,11 @@ RSpec.describe Tooling::Danger::FeatureFlag do let(:feature_flag_path) { 'config/feature_flags/development/entry.yml' } let(:group) { 'group::source code' } let(:raw_yaml) do - YAML.dump('group' => group) + YAML.dump( + 'group' => group, + 'default_enabled' => true, + 'rollout_issue_url' => 'https://gitlab.com/gitlab-org/gitlab/-/issues/1' + ) end subject(:found) { described_class.new(feature_flag_path) } @@ -109,6 +113,18 @@ RSpec.describe Tooling::Danger::FeatureFlag do end end + describe '#default_enabled' do + it 'returns the default_enabled found in the YAML' do + expect(found.default_enabled).to eq(true) + end + end + + describe '#rollout_issue_url' do + it 'returns the rollout_issue_url found in the YAML' do + expect(found.rollout_issue_url).to eq('https://gitlab.com/gitlab-org/gitlab/-/issues/1') + end + end + describe '#group_match_mr_label?' do subject(:result) { found.group_match_mr_label?(mr_group_label) } |