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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 12:08:42 +0300
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/lib/gitlab/usage_data_counters/redis_counter_spec.rb
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/lib/gitlab/usage_data_counters/redis_counter_spec.rb')
-rw-r--r--spec/lib/gitlab/usage_data_counters/redis_counter_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/lib/gitlab/usage_data_counters/redis_counter_spec.rb b/spec/lib/gitlab/usage_data_counters/redis_counter_spec.rb
index d4f6110b3df..753e09731bf 100644
--- a/spec/lib/gitlab/usage_data_counters/redis_counter_spec.rb
+++ b/spec/lib/gitlab/usage_data_counters/redis_counter_spec.rb
@@ -8,12 +8,12 @@ RSpec.describe Gitlab::UsageDataCounters::RedisCounter, :clean_gitlab_redis_shar
subject { Class.new.extend(described_class) }
before do
- stub_application_setting(usage_ping_enabled: setting_value)
+ allow(::ServicePing::ServicePingSettings).to receive(:enabled?).and_return(service_ping_enabled)
end
describe '.increment' do
context 'when usage_ping is disabled' do
- let(:setting_value) { false }
+ let(:service_ping_enabled) { false }
it 'counter is not increased' do
expect do
@@ -23,7 +23,7 @@ RSpec.describe Gitlab::UsageDataCounters::RedisCounter, :clean_gitlab_redis_shar
end
context 'when usage_ping is enabled' do
- let(:setting_value) { true }
+ let(:service_ping_enabled) { true }
it 'counter is increased' do
expect do
@@ -35,7 +35,7 @@ RSpec.describe Gitlab::UsageDataCounters::RedisCounter, :clean_gitlab_redis_shar
describe '.increment_by' do
context 'when usage_ping is disabled' do
- let(:setting_value) { false }
+ let(:service_ping_enabled) { false }
it 'counter is not increased' do
expect do
@@ -45,7 +45,7 @@ RSpec.describe Gitlab::UsageDataCounters::RedisCounter, :clean_gitlab_redis_shar
end
context 'when usage_ping is enabled' do
- let(:setting_value) { true }
+ let(:service_ping_enabled) { true }
it 'counter is increased' do
expect do