From f5c3f32975addd56fe8659f1c346d0e56f0b23d9 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 15 Mar 2021 15:09:07 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/experiments/application_experiment_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/experiments') diff --git a/spec/experiments/application_experiment_spec.rb b/spec/experiments/application_experiment_spec.rb index 0a46155b56d..2481ee5a806 100644 --- a/spec/experiments/application_experiment_spec.rb +++ b/spec/experiments/application_experiment_spec.rb @@ -58,6 +58,15 @@ RSpec.describe ApplicationExperiment, :experiment do end describe "publishing results" do + it "doesn't track or push data to the client if we shouldn't track", :snowplow do + allow(subject).to receive(:should_track?).and_return(false) + expect(Gon).not_to receive(:push) + + subject.publish(:action) + + expect_no_snowplow_event + end + it "tracks the assignment" do expect(subject).to receive(:track).with(:assignment) -- cgit v1.2.3