Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d7b8c52b
Commit
d7b8c52b
authored
Aug 13, 2020
by
Dallas Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Record user for contact_sales_btn_in_app experiment
parent
7d542903
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
0 deletions
+14
-0
ee/app/controllers/groups/billings_controller.rb
ee/app/controllers/groups/billings_controller.rb
+1
-0
ee/app/controllers/profiles/billings_controller.rb
ee/app/controllers/profiles/billings_controller.rb
+1
-0
ee/spec/controllers/groups/billings_controller_spec.rb
ee/spec/controllers/groups/billings_controller_spec.rb
+6
-0
ee/spec/controllers/profiles/billings_controller_spec.rb
ee/spec/controllers/profiles/billings_controller_spec.rb
+6
-0
No files found.
ee/app/controllers/groups/billings_controller.rb
View file @
d7b8c52b
...
...
@@ -10,5 +10,6 @@ class Groups::BillingsController < Groups::ApplicationController
@top_most_group
=
@group
.
root_ancestor
if
@group
.
has_parent?
current_plan
=
(
@top_most_group
||
@group
).
plan_name_for_upgrading
@plans_data
=
FetchSubscriptionPlansService
.
new
(
plan:
current_plan
).
execute
record_experiment_user
(
:contact_sales_btn_in_app
)
end
end
ee/app/controllers/profiles/billings_controller.rb
View file @
d7b8c52b
...
...
@@ -7,5 +7,6 @@ class Profiles::BillingsController < Profiles::ApplicationController
@plans_data
=
FetchSubscriptionPlansService
.
new
(
plan:
current_user
.
namespace
.
plan_name_for_upgrading
)
.
execute
record_experiment_user
(
:contact_sales_btn_in_app
)
end
end
ee/spec/controllers/groups/billings_controller_spec.rb
View file @
d7b8c52b
...
...
@@ -48,6 +48,12 @@ RSpec.describe Groups::BillingsController do
expect
(
assigns
(
:plans_data
)).
to
eq
(
data
)
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
context
'unauthorized'
do
...
...
ee/spec/controllers/profiles/billings_controller_spec.rb
View file @
d7b8c52b
...
...
@@ -38,5 +38,11 @@ RSpec.describe Profiles::BillingsController do
expect
(
assigns
(
:plans_data
)).
to
eq
(
data
)
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment