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
da70aa07
Commit
da70aa07
authored
May 24, 2019
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move ee-specific parts from Admin::DashboardController
parent
68677bcd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
21 deletions
+31
-21
ee/spec/controllers/admin/dashboard_controller_spec.rb
ee/spec/controllers/admin/dashboard_controller_spec.rb
+31
-0
spec/controllers/admin/dashboard_controller_spec.rb
spec/controllers/admin/dashboard_controller_spec.rb
+0
-21
No files found.
ee/spec/controllers/admin/dashboard_controller_spec.rb
0 → 100644
View file @
da70aa07
# frozen_string_literal: true
require
'spec_helper'
describe
Admin
::
DashboardController
do
describe
'#index'
do
it
"allows an admin user to access the page"
do
sign_in
(
create
(
:user
,
:admin
))
get
:index
expect
(
response
).
to
have_gitlab_http_status
(
200
)
end
it
"does not allow an auditor user to access the page"
do
sign_in
(
create
(
:user
,
:auditor
))
get
:index
expect
(
response
).
to
have_gitlab_http_status
(
404
)
end
it
"does not allow a regular user to access the page"
do
sign_in
(
create
(
:user
))
get
:index
expect
(
response
).
to
have_gitlab_http_status
(
404
)
end
end
end
spec/controllers/admin/dashboard_controller_spec.rb
View file @
da70aa07
...
...
@@ -4,27 +4,6 @@ require 'spec_helper'
describe
Admin
::
DashboardController
do
describe
'#index'
do
it
"allows an admin user to access the page"
do
sign_in
(
create
(
:user
,
:admin
))
get
:index
expect
(
response
).
to
have_gitlab_http_status
(
200
)
end
it
"does not allow an auditor user to access the page"
do
sign_in
(
create
(
:user
,
:auditor
))
get
:index
expect
(
response
).
to
have_gitlab_http_status
(
404
)
end
it
"does not allow a regular user to access the page"
do
sign_in
(
create
(
:user
))
get
:index
expect
(
response
).
to
have_gitlab_http_status
(
404
)
end
context
'with pending_delete projects'
do
render_views
...
...
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