BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
82539cff
Commit
82539cff
authored
Mar 31, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'clean-up-user-controller-spec' into 'master'
Minor clean up on admin/users_controller_spec Extracted from !3439 See merge request !3460
parents
1bb7a6c4
340f1fc9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
users_controller_spec.rb
spec/controllers/admin/users_controller_spec.rb
+3
-12
No files found.
spec/controllers/admin/users_controller_spec.rb
View file @
82539cff
require
'spec_helper'
describe
Admin
::
UsersController
do
let
(
:
admin
)
{
create
(
:admin
)
}
let
(
:
user
)
{
create
(
:user
)
}
before
do
sign_in
(
admin
)
sign_in
(
create
(
:admin
)
)
end
describe
'DELETE #user with projects'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:project
)
{
create
(
:empty_project
,
namespace:
user
.
namespace
)
}
before
do
project
.
team
<<
[
user
,
:developer
]
...
...
@@ -23,8 +22,6 @@ describe Admin::UsersController do
end
describe
'PUT block/:id'
do
let
(
:user
)
{
create
(
:user
)
}
it
'blocks user'
do
put
:block
,
id:
user
.
username
user
.
reload
...
...
@@ -50,8 +47,6 @@ describe Admin::UsersController do
end
context
'manually blocked users'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
user
.
block
end
...
...
@@ -66,8 +61,6 @@ describe Admin::UsersController do
end
describe
'PUT unlock/:id'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
request
.
env
[
"HTTP_REFERER"
]
=
"/"
user
.
lock_access!
...
...
@@ -95,8 +88,6 @@ describe Admin::UsersController do
end
describe
'PATCH disable_two_factor'
do
let
(
:user
)
{
create
(
:user
)
}
it
'disables 2FA for the user'
do
expect
(
user
).
to
receive
(
:disable_two_factor!
)
allow
(
subject
).
to
receive
(
:user
).
and_return
(
user
)
...
...
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