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

dormant_user_setting_enabled_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: 5c8ca502f82ba07581cbd37c5de3662c9d2f4972 (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::DormantUserSettingEnabledMetric do
  using RSpec::Parameterized::TableSyntax

  where(:deactivate_dormant_users_enabled, :expected_value) do
    1 | 1
    0 | 0
  end

  with_them do
    before do
      stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
      stub_application_setting(deactivate_dormant_users: deactivate_dormant_users_enabled)
    end

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