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
086542e2
Commit
086542e2
authored
Feb 11, 2020
by
Alex Buijs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix URL params breaking flow recognition
parent
fcc2bdb4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
ee/app/helpers/ee/registrations_helper.rb
ee/app/helpers/ee/registrations_helper.rb
+3
-1
ee/spec/helpers/ee/registrations_helper_spec.rb
ee/spec/helpers/ee/registrations_helper_spec.rb
+6
-4
No files found.
ee/app/helpers/ee/registrations_helper.rb
View file @
086542e2
...
...
@@ -3,7 +3,9 @@
module
EE
module
RegistrationsHelper
def
in_paid_signup_flow?
experiment_enabled?
(
:paid_signup_flow
)
&&
session
[
'user_return_to'
]
==
new_subscriptions_path
experiment_enabled?
(
:paid_signup_flow
)
&&
(
redirect_to
=
session
[
'user_return_to'
])
&&
URI
.
parse
(
redirect_to
).
path
==
new_subscriptions_path
end
end
end
ee/spec/helpers/ee/registrations_helper_spec.rb
View file @
086542e2
...
...
@@ -7,10 +7,12 @@ describe EE::RegistrationsHelper do
describe
'#in_paid_signup_flow?'
do
where
(
:user_return_to_path
,
:paid_signup_flow_enabled
,
:expected_result
)
do
'/-/subscriptions/new'
|
true
|
true
'/-/subscriptions/new'
|
false
|
false
'/'
|
true
|
false
'/'
|
false
|
false
'/-/subscriptions/new?plan_id=bronze_plan'
|
true
|
true
'/-/subscriptions/new?plan_id=bronze_plan'
|
false
|
false
'/foo'
|
true
|
false
'/foo'
|
false
|
false
nil
|
true
|
nil
nil
|
false
|
false
end
with_them
do
...
...
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