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
0820adcf
Commit
0820adcf
authored
Oct 01, 2020
by
sfang97
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DRY user 404 test
parent
a30a420e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+6
-2
No files found.
spec/requests/api/users_spec.rb
View file @
0820adcf
...
...
@@ -2400,7 +2400,9 @@ RSpec.describe API::Users, :do_not_mock_admin_mode do
end
describe
'POST /users/:id/deactivate'
do
subject
{
post
api
(
"/users/
#{
user
.
id
}
/deactivate"
,
api_user
)
}
subject
{
post
api
(
"/users/
#{
user_id
}
/deactivate"
,
api_user
)
}
let
(
:user_id
)
{
user
.
id
}
context
'performed by a non-admin user'
do
let
(
:api_user
)
{
user
}
...
...
@@ -2496,8 +2498,10 @@ RSpec.describe API::Users, :do_not_mock_admin_mode do
end
context
'for a user that does not exist'
do
let
(
:user_id
)
{
0
}
before
do
post
api
(
"/users/0/deactivate"
,
admin
)
subject
end
it_behaves_like
'404'
...
...
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