summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/usage_data_spec.rb
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2019-07-19 11:11:27 +0000
committerNick Thomas <nick@gitlab.com>2019-07-19 11:11:27 +0000
commit01685eed7674ec841b4249b42f9b350f4a105e4a (patch)
tree54d710450f9d7a99e6eb9daac4b65efc7bbda6c8 /spec/lib/gitlab/usage_data_spec.rb
parent550ac6ef823d76a7274b562cd63d2dddafa65b2f (diff)
downloadgitlab-ce-01685eed7674ec841b4249b42f9b350f4a105e4a.tar.gz
Added Usage Data for some Web IDE actions
The actions tracked in the web IDE are: - creation of commits - creation of merge requests - projects loaded
Diffstat (limited to 'spec/lib/gitlab/usage_data_spec.rb')
-rw-r--r--spec/lib/gitlab/usage_data_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb
index 90a534de202..270dd652c20 100644
--- a/spec/lib/gitlab/usage_data_spec.rb
+++ b/spec/lib/gitlab/usage_data_spec.rb
@@ -57,12 +57,22 @@ describe Gitlab::UsageData do
gitaly
database
avg_cycle_analytics
+ web_ide_views
web_ide_commits
+ web_ide_merge_requests
influxdb_metrics_enabled
prometheus_metrics_enabled
))
end
+ it 'calls expected usage data methods' do
+ expect(Gitlab::UsageDataCounters::WebIdeCounter).to receive(:total_commits_count)
+ expect(Gitlab::UsageDataCounters::WebIdeCounter).to receive(:total_merge_requests_count)
+ expect(Gitlab::UsageDataCounters::WebIdeCounter).to receive(:total_views_count)
+
+ subject
+ end
+
it "gathers usage counts" do
expected_keys = %i(
assignee_lists