Commit c9253c3e authored by syasonik's avatar syasonik

Rubocop cleanup

parent 3d302879
......@@ -158,7 +158,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController
end
def metrics_dashboard
render_403 and return unless Feature.enabled?(:environment_metrics_use_prometheus_endpoint, project)
render_403 && return unless Feature.enabled?(:environment_metrics_use_prometheus_endpoint, project)
respond_to do |format|
format.json do
......
......@@ -21,12 +21,11 @@ describe MetricsDashboardProcessingService do
let!(:project_metric) { create(:prometheus_metric, project: project) }
it 'includes project-specific metrics' do
project_metric_details = {
query_range: project_metric.query,
unit: project_metric.unit,
label: project_metric.legend,
metric_id: project_metric.id,
metric_id: project_metric.id
}
expect(all_metrics).to include project_metric_details
......@@ -41,7 +40,7 @@ describe MetricsDashboardProcessingService do
end
it 'orders groups by priority and panels by weight' do
expected_metrics_order = ['metric_b', 'metric_a2', 'metric_a1']
expected_metrics_order = %w('metric_b metric_a2 metric_a1')
actual_metrics_order = all_metrics.map { |m| m[:id] }
expect(actual_metrics_order).to eq expected_metrics_order
......
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