summaryrefslogtreecommitdiff
path: root/spec/support/helpers/metrics_dashboard_helpers.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-27 12:06:30 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-27 12:06:30 +0000
commit3269a20692c5b1f32862072d7897a4e753bae9ef (patch)
tree9dfc6e7ccb857b323dc8b12259d339b76b8b90bf /spec/support/helpers/metrics_dashboard_helpers.rb
parentc02f53288a838166a28518983fae3b80ca5936d8 (diff)
downloadgitlab-ce-3269a20692c5b1f32862072d7897a4e753bae9ef.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/helpers/metrics_dashboard_helpers.rb')
-rw-r--r--spec/support/helpers/metrics_dashboard_helpers.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/support/helpers/metrics_dashboard_helpers.rb b/spec/support/helpers/metrics_dashboard_helpers.rb
index 0e86b6dfda7..98f235bdac4 100644
--- a/spec/support/helpers/metrics_dashboard_helpers.rb
+++ b/spec/support/helpers/metrics_dashboard_helpers.rb
@@ -19,7 +19,7 @@ module MetricsDashboardHelpers
end
def system_dashboard_path
- Metrics::Dashboard::SystemDashboardService::SYSTEM_DASHBOARD_PATH
+ Metrics::Dashboard::SystemDashboardService::DASHBOARD_PATH
end
def business_metric_title
@@ -53,6 +53,15 @@ module MetricsDashboardHelpers
it_behaves_like 'valid dashboard service response for schema'
end
+ shared_examples_for 'caches the unprocessed dashboard for subsequent calls' do
+ it do
+ expect(YAML).to receive(:safe_load).once.and_call_original
+
+ described_class.new(*service_params).get_dashboard
+ described_class.new(*service_params).get_dashboard
+ end
+ end
+
shared_examples_for 'valid embedded dashboard service response' do
let(:dashboard_schema) { JSON.parse(fixture_file('lib/gitlab/metrics/dashboard/schemas/embedded_dashboard.json')) }