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

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

require 'spec_helper'

RSpec.describe Gitlab::Usage::Metrics::Instrumentations::DistinctCountProjectsWithExpirationPolicyDisabledMetric do
  before_all do
    create(:container_expiration_policy, enabled: false)
    create(:container_expiration_policy, enabled: false, created_at: 29.days.ago)
    create(:container_expiration_policy, enabled: true)
  end

  it_behaves_like 'a correct instrumented metric value', { time_frame: '28d' } do
    let(:expected_value) { 1 }
  end

  it_behaves_like 'a correct instrumented metric value', { time_frame: 'all' } do
    let(:expected_value) { 2 }
  end
end