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
60c33b8d
Commit
60c33b8d
authored
Sep 06, 2019
by
Aishwarya Subramanian
Committed by
Sean McGivern
Sep 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feature flag for improved trials sign up
parent
d979df91
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
ee/app/controllers/trial_registrations_controller.rb
ee/app/controllers/trial_registrations_controller.rb
+5
-0
ee/spec/controllers/trial_registrations_controller_spec.rb
ee/spec/controllers/trial_registrations_controller_spec.rb
+13
-0
No files found.
ee/app/controllers/trial_registrations_controller.rb
View file @
60c33b8d
...
...
@@ -2,6 +2,7 @@
class
TrialRegistrationsController
<
RegistrationsController
before_action
:check_if_gl_com
before_action
:check_if_improved_trials_enabled
private
...
...
@@ -16,4 +17,8 @@ class TrialRegistrationsController < RegistrationsController
def
check_if_gl_com
render_404
unless
Gitlab
.
com?
end
def
check_if_improved_trials_enabled
render_404
unless
Feature
.
enabled?
(
:improved_trial_signup
)
end
end
ee/spec/controllers/trial_registrations_controller_spec.rb
View file @
60c33b8d
...
...
@@ -31,6 +31,19 @@ describe TrialRegistrationsController do
end
end
context
'when feature is turned off'
do
before
do
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
stub_feature_flags
(
improved_trial_signup:
false
)
end
it
'returns not found'
do
post
:create
,
params:
{
user:
user_params
}
expect
(
response
.
status
).
to
eq
(
404
)
end
end
context
'when valid'
do
before
do
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
...
...
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