diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-27 12:06:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-27 12:06:30 +0000 |
commit | 3269a20692c5b1f32862072d7897a4e753bae9ef (patch) | |
tree | 9dfc6e7ccb857b323dc8b12259d339b76b8b90bf /spec/services/metrics/dashboard | |
parent | c02f53288a838166a28518983fae3b80ca5936d8 (diff) | |
download | gitlab-ce-3269a20692c5b1f32862072d7897a4e753bae9ef.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/metrics/dashboard')
-rw-r--r-- | spec/services/metrics/dashboard/system_dashboard_service_spec.rb | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/spec/services/metrics/dashboard/system_dashboard_service_spec.rb b/spec/services/metrics/dashboard/system_dashboard_service_spec.rb index ec861465662..95c5a1479a4 100644 --- a/spec/services/metrics/dashboard/system_dashboard_service_spec.rb +++ b/spec/services/metrics/dashboard/system_dashboard_service_spec.rb @@ -14,24 +14,18 @@ describe Metrics::Dashboard::SystemDashboardService, :use_clean_rails_memory_sto end describe 'get_dashboard' do - let(:dashboard_path) { described_class::SYSTEM_DASHBOARD_PATH } + let(:dashboard_path) { described_class::DASHBOARD_PATH } let(:service_params) { [project, user, { environment: environment, dashboard_path: dashboard_path }] } let(:service_call) { described_class.new(*service_params).get_dashboard } it_behaves_like 'valid dashboard service response' it_behaves_like 'raises error for users with insufficient permissions' - - it 'caches the unprocessed dashboard for subsequent calls' 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 + it_behaves_like 'caches the unprocessed dashboard for subsequent calls' context 'when called with a non-system dashboard' do let(:dashboard_path) { 'garbage/dashboard/path' } - # We want to alwaus return the system dashboard. + # We want to always return the system dashboard. it_behaves_like 'valid dashboard service response' end end @@ -42,8 +36,8 @@ describe Metrics::Dashboard::SystemDashboardService, :use_clean_rails_memory_sto expect(all_dashboards).to eq( [{ - path: described_class::SYSTEM_DASHBOARD_PATH, - display_name: described_class::SYSTEM_DASHBOARD_NAME, + path: described_class::DASHBOARD_PATH, + display_name: described_class::DASHBOARD_NAME, default: true, system_dashboard: true }] |