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
|