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/support/shared_examples/controllers/trackable_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/controllers/trackable_shared_examples.rb39
1 files changed, 0 insertions, 39 deletions
diff --git a/spec/support/shared_examples/controllers/trackable_shared_examples.rb b/spec/support/shared_examples/controllers/trackable_shared_examples.rb
deleted file mode 100644
index dac7d8c94ff..00000000000
--- a/spec/support/shared_examples/controllers/trackable_shared_examples.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: true
-
-RSpec.shared_examples 'a Trackable Controller' do
- describe '#track_event', :snowplow do
- before do
- sign_in user
- end
-
- context 'with no params' do
- controller(described_class) do
- def index
- track_event
- head :ok
- end
- end
-
- it 'tracks the action name', :snowplow do
- get :index
-
- expect_snowplow_event(category: 'AnonymousController', action: 'index')
- end
- end
-
- context 'with params' do
- controller(described_class) do
- def index
- track_event('some_event', category: 'SomeCategory', label: 'errorlabel')
- head :ok
- end
- end
-
- it 'tracks with the specified param' do
- get :index
-
- expect_snowplow_event(category: 'SomeCategory', action: 'some_event', label: 'errorlabel')
- end
- end
- end
-end