Commit 26efb338 authored by James Fargher's avatar James Fargher

Merge branch 'record-experiment-user-for-contact-sales-btn-in-app-experiment' into 'master'

Record user for contact_sales_btn_in_app experiment

See merge request gitlab-org/gitlab!39510
parents 82d6547b d7b8c52b
...@@ -10,5 +10,6 @@ class Groups::BillingsController < Groups::ApplicationController ...@@ -10,5 +10,6 @@ class Groups::BillingsController < Groups::ApplicationController
@top_most_group = @group.root_ancestor if @group.has_parent? @top_most_group = @group.root_ancestor if @group.has_parent?
current_plan = (@top_most_group || @group).plan_name_for_upgrading current_plan = (@top_most_group || @group).plan_name_for_upgrading
@plans_data = FetchSubscriptionPlansService.new(plan: current_plan).execute @plans_data = FetchSubscriptionPlansService.new(plan: current_plan).execute
record_experiment_user(:contact_sales_btn_in_app)
end end
end end
...@@ -7,5 +7,6 @@ class Profiles::BillingsController < Profiles::ApplicationController ...@@ -7,5 +7,6 @@ class Profiles::BillingsController < Profiles::ApplicationController
@plans_data = FetchSubscriptionPlansService @plans_data = FetchSubscriptionPlansService
.new(plan: current_user.namespace.plan_name_for_upgrading) .new(plan: current_user.namespace.plan_name_for_upgrading)
.execute .execute
record_experiment_user(:contact_sales_btn_in_app)
end end
end end
...@@ -48,6 +48,12 @@ RSpec.describe Groups::BillingsController do ...@@ -48,6 +48,12 @@ RSpec.describe Groups::BillingsController do
expect(assigns(:plans_data)).to eq(data) expect(assigns(:plans_data)).to eq(data)
end end
it 'records user for the contact_sales_btn_in_app experiment' do
expect(controller).to receive(:record_experiment_user).with(:contact_sales_btn_in_app)
get_index
end
end end
context 'unauthorized' do context 'unauthorized' do
......
...@@ -38,5 +38,11 @@ RSpec.describe Profiles::BillingsController do ...@@ -38,5 +38,11 @@ RSpec.describe Profiles::BillingsController do
expect(assigns(:plans_data)).to eq(data) expect(assigns(:plans_data)).to eq(data)
end end
it 'records user for the contact_sales_btn_in_app experiment' do
expect(controller).to receive(:record_experiment_user).with(:contact_sales_btn_in_app)
get_index
end
end end
end end
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