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

dormant_user_period_setting_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: a63616aeb489a1a8b2d61ef7c66103c49508892f (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 Gitlab::Usage::Metrics::Instrumentations::DormantUserPeriodSettingMetric do
  using RSpec::Parameterized::TableSyntax

  where(:deactivate_dormant_users_period_value, :expected_value) do
    90   | 90 # default
    365  | 365
  end

  with_them do
    before do
      stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
      stub_application_setting(deactivate_dormant_users_period: deactivate_dormant_users_period_value)
    end

    it_behaves_like 'a correct instrumented metric value', {}
  end
end