Commit a64f507e authored by Markus Koller's avatar Markus Koller

Merge branch '276948-use-feature-from-know_events-yml-files-for-unique_visits_helper' into 'master'

Remove extra feature flag check from unique_visits_helper.rb [RUN ALL RSPEC]

See merge request gitlab-org/gitlab!54202
parents 680f4b18 9a2347b5
...@@ -14,7 +14,6 @@ module Analytics ...@@ -14,7 +14,6 @@ module Analytics
end end
def track_visit(target_id) def track_visit(target_id)
return unless Feature.enabled?(:track_unique_visits, default_enabled: true)
return unless visitor_id return unless visitor_id
Gitlab::Analytics::UniqueVisits.new.track_visit(visitor_id, target_id) Gitlab::Analytics::UniqueVisits.new.track_visit(visitor_id, target_id)
......
...@@ -9,19 +9,6 @@ RSpec.describe Analytics::UniqueVisitsHelper do ...@@ -9,19 +9,6 @@ RSpec.describe Analytics::UniqueVisitsHelper do
let(:target_id) { 'p_analytics_valuestream' } let(:target_id) { 'p_analytics_valuestream' }
let(:current_user) { create(:user) } let(:current_user) { create(:user) }
before do
stub_feature_flags(track_unique_visits: true)
end
it 'does not track visits if feature flag disabled' do
stub_feature_flags(track_unique_visits: false)
sign_in(current_user)
expect_any_instance_of(Gitlab::Analytics::UniqueVisits).not_to receive(:track_visit)
helper.track_visit(target_id)
end
it 'does not track visit if user is not logged in' do it 'does not track visit if user is not logged in' do
expect_any_instance_of(Gitlab::Analytics::UniqueVisits).not_to receive(:track_visit) expect_any_instance_of(Gitlab::Analytics::UniqueVisits).not_to receive(:track_visit)
......
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