Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/finders/template_finder_spec.rb')
-rw-r--r--spec/finders/template_finder_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/finders/template_finder_spec.rb b/spec/finders/template_finder_spec.rb
index 21fea7863ff..c466f533a61 100644
--- a/spec/finders/template_finder_spec.rb
+++ b/spec/finders/template_finder_spec.rb
@@ -103,6 +103,10 @@ RSpec.describe TemplateFinder do
describe '#build' do
let(:project) { build_stubbed(:project) }
+ before do
+ stub_feature_flags(remove_monitor_metrics: false)
+ end
+
where(:type, :expected_class) do
:dockerfiles | described_class
:gitignores | described_class
@@ -119,6 +123,16 @@ RSpec.describe TemplateFinder do
it { is_expected.to be_a(expected_class) }
it { expect(finder.project).to eq(project) }
end
+
+ context 'when metrics dashboard is unavailable' do
+ before do
+ stub_feature_flags(remove_monitor_metrics: true)
+ end
+
+ subject(:finder) { described_class.build(:metrics_dashboard_ymls, project) }
+
+ it { is_expected.to be_nil }
+ end
end
describe '#execute' do