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/controllers/projects/service_ping_controller_spec.rb')
-rw-r--r--spec/controllers/projects/service_ping_controller_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/controllers/projects/service_ping_controller_spec.rb b/spec/controllers/projects/service_ping_controller_spec.rb
index fa92efee079..22fb18edc80 100644
--- a/spec/controllers/projects/service_ping_controller_spec.rb
+++ b/spec/controllers/projects/service_ping_controller_spec.rb
@@ -80,16 +80,24 @@ RSpec.describe Projects::ServicePingController do
it_behaves_like 'counter is not increased'
it_behaves_like 'counter is increased', 'WEB_IDE_PREVIEWS_SUCCESS_COUNT'
- context 'when the user has access to the project' do
+ context 'when the user has access to the project', :snowplow do
let(:user) { project.owner }
it 'increases the live preview view counter' do
- expect(Gitlab::UsageDataCounters::EditorUniqueCounter).to receive(:track_live_preview_edit_action).with(author: user)
+ expect(Gitlab::UsageDataCounters::EditorUniqueCounter).to receive(:track_live_preview_edit_action).with(author: user, project: project)
subject
expect(response).to have_gitlab_http_status(:ok)
end
+
+ it_behaves_like 'Snowplow event tracking' do
+ let(:project) { create(:project) }
+ let(:category) { 'ide_edit' }
+ let(:action) { 'g_edit_by_live_preview' }
+ let(:namespace) { project.namespace }
+ let(:feature_flag_name) { :route_hll_to_snowplow_phase2 }
+ end
end
end