summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/usage_data_counters/editor_unique_counter_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/usage_data_counters/editor_unique_counter_spec.rb')
-rw-r--r--spec/lib/gitlab/usage_data_counters/editor_unique_counter_spec.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/lib/gitlab/usage_data_counters/editor_unique_counter_spec.rb b/spec/lib/gitlab/usage_data_counters/editor_unique_counter_spec.rb
index f2c1d8718d7..82db3d94493 100644
--- a/spec/lib/gitlab/usage_data_counters/editor_unique_counter_spec.rb
+++ b/spec/lib/gitlab/usage_data_counters/editor_unique_counter_spec.rb
@@ -74,7 +74,19 @@ RSpec.describe Gitlab::UsageDataCounters::EditorUniqueCounter, :clean_gitlab_red
end
end
- it 'can return the count of actions per user deduplicated ' do
+ context 'for SSE edit actions' do
+ it_behaves_like 'tracks and counts action' do
+ def track_action(params)
+ described_class.track_sse_edit_action(**params)
+ end
+
+ def count_unique(params)
+ described_class.count_sse_edit_actions(**params)
+ end
+ end
+ end
+
+ it 'can return the count of actions per user deduplicated' do
described_class.track_web_ide_edit_action(author: user1)
described_class.track_snippet_editor_edit_action(author: user1)
described_class.track_sfe_edit_action(author: user1)