Commit fa518963 authored by Victor Zagorodny's avatar Victor Zagorodny
Browse files

Protect group overview usage ping w/ feature flag

user_preferences key is includes into system usage
data only if group_overview_security_dashboard
feature flag is enabled; see
parent 60bd0a24
......@@ -93,8 +93,11 @@ def system_usage_data
.merge(user_preferences: user_preferences_usage)
}.tap do |data|
if Feature.enabled?(:group_overview_security_dashboard)
data[:counts][:user_preferences] = user_preferences_usage
# rubocop: enable CodeReuse/ActiveRecord
......@@ -128,6 +128,11 @@
it 'does not gather user preferences usage data when the feature is disabled' do
stub_feature_flags(group_overview_security_dashboard: false)
expect(subject[:counts].keys).not_to include(:user_preferences)
it 'gathers projects data correctly' do
count_data = subject[:counts]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment