Commit 807e22ce authored by Mikolaj Wawrzyniak's avatar Mikolaj Wawrzyniak

Refactor ClusterDashboardService unit test suite

ClusterDashboardService is overriding dashboard_path method, in a way
that only path stored internal as a constant is used instead of
the one passed in parameters hash.
To reduce confusion ommited parameter (dashboard_path) is removed for
spec file for this service.
parent b72944b2
......@@ -15,8 +15,7 @@ describe Metrics::Dashboard::ClusterDashboardService, :use_clean_rails_memory_st
end
describe 'get_dashboard' do
let(:dashboard_path) { described_class::CLUSTER_DASHBOARD_PATH }
let(:service_params) { [project, user, { cluster: cluster, cluster_type: :project, dashboard_path: dashboard_path }] }
let(:service_params) { [project, user, { cluster: cluster, cluster_type: :project }] }
let(:service_call) { described_class.new(*service_params).get_dashboard }
it_behaves_like 'valid dashboard service response'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment