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:
Diffstat (limited to 'spec/services/git/branch_hooks_service_spec.rb')
-rw-r--r--spec/services/git/branch_hooks_service_spec.rb21
1 files changed, 4 insertions, 17 deletions
diff --git a/spec/services/git/branch_hooks_service_spec.rb b/spec/services/git/branch_hooks_service_spec.rb
index 3050d6c5eca..8fd542542ae 100644
--- a/spec/services/git/branch_hooks_service_spec.rb
+++ b/spec/services/git/branch_hooks_service_spec.rb
@@ -133,27 +133,14 @@ RSpec.describe Git::BranchHooksService, :clean_gitlab_redis_shared_state, featur
expect(Gitlab::UsageDataCounters::HLLRedisCounter.unique_events(event_names: 'o_pipeline_authoring_unique_users_committing_ciconfigfile', start_date: time, end_date: time + 7.days)).to eq(1)
end
- context 'when usage ping is disabled' do
- before do
- allow(::ServicePing::ServicePingSettings).to receive(:enabled?).and_return(false)
- end
-
- it 'does not track the event' do
- execute_service
-
- expect(Gitlab::UsageDataCounters::HLLRedisCounter)
- .not_to receive(:track_event).with(*tracking_params)
- end
- end
-
context 'when the branch is not the main branch' do
let(:branch) { 'feature' }
it 'does not track the event' do
- execute_service
-
expect(Gitlab::UsageDataCounters::HLLRedisCounter)
.not_to receive(:track_event).with(*tracking_params)
+
+ execute_service
end
end
@@ -163,10 +150,10 @@ RSpec.describe Git::BranchHooksService, :clean_gitlab_redis_shared_state, featur
end
it 'does not track the event' do
- execute_service
-
expect(Gitlab::UsageDataCounters::HLLRedisCounter)
.not_to receive(:track_event).with(*tracking_params)
+
+ execute_service
end
end
end