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
d11a0cbb
Commit
d11a0cbb
authored
Jun 10, 2019
by
Mark Florian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for unauthorized user
parent
c0e443ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
ee/spec/controllers/projects/dependencies_controller_spec.rb
ee/spec/controllers/projects/dependencies_controller_spec.rb
+22
-7
No files found.
ee/spec/controllers/projects/dependencies_controller_spec.rb
View file @
d11a0cbb
...
...
@@ -3,18 +3,15 @@
require
'spec_helper'
describe
Projects
::
DependenciesController
do
set
(
:project
)
{
create
(
:project
,
:repository
,
:p
ublic
)
}
set
(
:project
)
{
create
(
:project
,
:repository
,
:p
rivate
)
}
set
(
:user
)
{
create
(
:user
)
}
subject
{
get
:show
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
}
}
before
do
project
.
add_developer
(
user
)
end
describe
'GET show'
do
context
'with authorized user'
do
before
do
project
.
add_developer
(
user
)
sign_in
(
user
)
end
...
...
@@ -41,6 +38,15 @@ describe Projects::DependenciesController do
end
context
'with unauthorized user'
do
before
do
sign_in
(
user
)
end
context
'when feature is available'
do
before
do
stub_licensed_features
(
dependency_list:
true
)
end
it
'returns 404'
do
subject
...
...
@@ -48,4 +54,13 @@ describe Projects::DependenciesController do
end
end
end
context
'with anonymous user'
do
it
'returns 302'
do
subject
expect
(
response
).
to
have_gitlab_http_status
(
302
)
end
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