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
fccf699e
Commit
fccf699e
authored
Oct 23, 2020
by
sfang97
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add changelog entry
Remove uneeded test Remove feature enabled from spec name Fix changelog typo
parent
24a6292e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
104 deletions
+85
-104
changelogs/unreleased/258980-feature-flag-rollout-of-admin-approval-for-new-user-signups.yml
...e-flag-rollout-of-admin-approval-for-new-user-signups.yml
+5
-0
spec/controllers/admin/users_controller_spec.rb
spec/controllers/admin/users_controller_spec.rb
+17
-19
spec/controllers/registrations_controller_spec.rb
spec/controllers/registrations_controller_spec.rb
+51
-69
spec/features/admin/admin_settings_spec.rb
spec/features/admin/admin_settings_spec.rb
+7
-9
spec/features/admin/admin_users_spec.rb
spec/features/admin/admin_users_spec.rb
+5
-7
No files found.
changelogs/unreleased/258980-feature-flag-rollout-of-admin-approval-for-new-user-signups.yml
0 → 100644
View file @
fccf699e
---
title
:
Remove admin_approval_for_new_user_signups feature flag
merge_request
:
46051
author
:
type
:
changed
spec/controllers/admin/users_controller_spec.rb
View file @
fccf699e
...
@@ -107,7 +107,6 @@ RSpec.describe Admin::UsersController do
...
@@ -107,7 +107,6 @@ RSpec.describe Admin::UsersController do
subject
{
put
:approve
,
params:
{
id:
user
.
username
}
}
subject
{
put
:approve
,
params:
{
id:
user
.
username
}
}
context
'when feature is enabled'
do
context
'when successful'
do
context
'when successful'
do
it
'activates the user'
do
it
'activates the user'
do
subject
subject
...
@@ -136,7 +135,6 @@ RSpec.describe Admin::UsersController do
...
@@ -136,7 +135,6 @@ RSpec.describe Admin::UsersController do
end
end
end
end
end
end
end
describe
'PUT #activate'
do
describe
'PUT #activate'
do
shared_examples
'a request that activates the user'
do
shared_examples
'a request that activates the user'
do
...
...
spec/controllers/registrations_controller_spec.rb
View file @
fccf699e
...
@@ -46,7 +46,6 @@ RSpec.describe RegistrationsController do
...
@@ -46,7 +46,6 @@ RSpec.describe RegistrationsController do
subject
{
post
(
:create
,
params:
user_params
)
}
subject
{
post
(
:create
,
params:
user_params
)
}
context
'`blocked_pending_approval` state'
do
context
'`blocked_pending_approval` state'
do
context
'when the feature is enabled'
do
context
'when the `require_admin_approval_after_user_signup` setting is turned on'
do
context
'when the `require_admin_approval_after_user_signup` setting is turned on'
do
before
do
before
do
stub_application_setting
(
require_admin_approval_after_user_signup:
true
)
stub_application_setting
(
require_admin_approval_after_user_signup:
true
)
...
@@ -122,23 +121,6 @@ RSpec.describe RegistrationsController do
...
@@ -122,23 +121,6 @@ RSpec.describe RegistrationsController do
end
end
end
end
context
'when the feature is disabled'
do
context
'when the `require_admin_approval_after_user_signup` setting is turned on'
do
before
do
stub_application_setting
(
require_admin_approval_after_user_signup:
true
)
end
it
'signs up the user in `active` state'
do
subject
created_user
=
User
.
find_by
(
email:
'new@user.com'
)
expect
(
created_user
).
to
be_present
expect
(
created_user
.
active?
).
to
eq
(
true
)
end
end
end
end
context
'email confirmation'
do
context
'email confirmation'
do
context
'when send_user_confirmation_email is false'
do
context
'when send_user_confirmation_email is false'
do
it
'signs the user in'
do
it
'signs the user in'
do
...
...
spec/features/admin/admin_settings_spec.rb
View file @
fccf699e
...
@@ -132,7 +132,6 @@ RSpec.describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_n
...
@@ -132,7 +132,6 @@ RSpec.describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_n
context
'Change Sign-up restrictions'
do
context
'Change Sign-up restrictions'
do
context
'Require Admin approval for new signup setting'
do
context
'Require Admin approval for new signup setting'
do
context
'when feature is enabled'
do
it
'changes the setting'
do
it
'changes the setting'
do
page
.
within
(
'.as-signup'
)
do
page
.
within
(
'.as-signup'
)
do
check
'Require admin approval for new sign-ups'
check
'Require admin approval for new sign-ups'
...
@@ -144,7 +143,6 @@ RSpec.describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_n
...
@@ -144,7 +143,6 @@ RSpec.describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_n
end
end
end
end
end
end
end
it
'Change Sign-in restrictions'
do
it
'Change Sign-in restrictions'
do
page
.
within
(
'.as-signin'
)
do
page
.
within
(
'.as-signin'
)
do
...
...
spec/features/admin/admin_users_spec.rb
View file @
fccf699e
...
@@ -75,7 +75,6 @@ RSpec.describe "Admin::Users" do
...
@@ -75,7 +75,6 @@ RSpec.describe "Admin::Users" do
end
end
context
'`Pending approval` tab'
do
context
'`Pending approval` tab'
do
context
'feature is enabled'
do
before
do
before
do
visit
admin_users_path
visit
admin_users_path
end
end
...
@@ -85,7 +84,6 @@ RSpec.describe "Admin::Users" do
...
@@ -85,7 +84,6 @@ RSpec.describe "Admin::Users" do
end
end
end
end
end
end
end
describe
'search and sort'
do
describe
'search and sort'
do
before
do
before
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