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
08195790
Commit
08195790
authored
Oct 02, 2020
by
Alper Akgun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove confirm email from trial form
parent
1f5b0c38
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
0 deletions
+40
-0
ee/app/controllers/trials_controller.rb
ee/app/controllers/trials_controller.rb
+7
-0
ee/changelogs/unreleased/231228-remove-confirm-email-from-trial-form.yml
...nreleased/231228-remove-confirm-email-from-trial-form.yml
+5
-0
ee/spec/controllers/trials_controller_spec.rb
ee/spec/controllers/trials_controller_spec.rb
+28
-0
No files found.
ee/app/controllers/trials_controller.rb
View file @
08195790
...
...
@@ -38,6 +38,13 @@ class TrialsController < ApplicationController
end
end
protected
# override the ConfirmEmailWarning method in order to skip
def
show_confirm_warning?
false
end
private
def
authenticate_user!
...
...
ee/changelogs/unreleased/231228-remove-confirm-email-from-trial-form.yml
0 → 100644
View file @
08195790
---
title
:
Remove confirm email from trial form
merge_request
:
43683
author
:
type
:
fixed
ee/spec/controllers/trials_controller_spec.rb
View file @
08195790
...
...
@@ -229,4 +229,32 @@ RSpec.describe TrialsController do
post
:apply
,
params:
post_params
end
end
describe
'confirm email warning'
do
before
do
get
:new
end
RSpec
::
Matchers
.
define
:set_confirm_warning_for
do
|
email
|
match
do
|
response
|
expect
(
response
).
to
set_flash
.
now
[
:warning
].
to
include
(
"Please check your email (
#{
email
}
) to verify that you own this address and unlock the power of CI/CD."
)
end
end
context
'with an unconfirmed email address present'
do
let
(
:user
)
{
create
(
:user
,
confirmed_at:
nil
,
unconfirmed_email:
'unconfirmed@gitlab.com'
)
}
before
do
sign_in
(
user
)
end
it
{
is_expected
.
not_to
set_confirm_warning_for
(
user
.
unconfirmed_email
)
}
end
context
'without an unconfirmed email address present'
do
let
(
:user
)
{
create
(
:user
,
confirmed_at:
nil
)
}
it
{
is_expected
.
not_to
set_confirm_warning_for
(
user
.
email
)
}
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