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

inline_alert_metrics_filter_spec.rb « filter « banzai « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: be40195f0017e23fb6ecce35fc56adc434d657bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Banzai::Filter::InlineAlertMetricsFilter do
  include FilterSpecHelper

  let(:params) { ['foo', 'bar', 12] }
  let(:query_params) { {} }

  let(:trigger_url) { urls.metrics_dashboard_namespace_project_prometheus_alert_url(*params, query_params) }
  let(:dashboard_url) { urls.metrics_dashboard_namespace_project_prometheus_alert_url(*params, **query_params, embedded: true, format: :json) }

  it_behaves_like 'a metrics embed filter'

  context 'with query params specified' do
    let(:query_params) { { timestamp: 'yesterday' } }

    it_behaves_like 'a metrics embed filter'
  end
end