diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-22 15:09:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-22 15:09:49 +0300 |
commit | 4b074c5f634f8e1e550107f9e8237f07878ca0e8 (patch) | |
tree | 00afed4a6853548ec97203f3f807d954180b547d /spec/workers | |
parent | b81fd57f3d62db4455108c8de4b8d7b8d403de35 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/post_receive_spec.rb | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/spec/workers/post_receive_spec.rb b/spec/workers/post_receive_spec.rb index f7fd1b1a0a7..a468c8c3482 100644 --- a/spec/workers/post_receive_spec.rb +++ b/spec/workers/post_receive_spec.rb @@ -94,30 +94,12 @@ RSpec.describe PostReceive do perform end - it 'tracks an event for the empty_repo_upload experiment', :snowplow do - allow_next_instance_of(ApplicationExperiment) do |e| - allow(e).to receive(:should_track?).and_return(true) - allow(e).to receive(:track_initial_writes) + it 'tracks an event for the empty_repo_upload experiment', :experiment do + expect_next_instance_of(EmptyRepoUploadExperiment) do |e| + expect(e).to receive(:track_initial_write) end perform - - expect_snowplow_event(category: 'empty_repo_upload', action: 'initial_write', context: [{ - schema: 'iglu:com.gitlab/gitlab_experiment/jsonschema/1-0-0', - data: anything - }]) - end - - it 'does not track an event for the empty_repo_upload experiment when project is not empty', :snowplow do - allow(empty_project).to receive(:empty_repo?).and_return(false) - allow_next_instance_of(ApplicationExperiment) do |e| - allow(e).to receive(:should_track?).and_return(true) - allow(e).to receive(:track_initial_writes) - end - - perform - - expect_no_snowplow_event end end |