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
01c530de
Commit
01c530de
authored
Jan 07, 2020
by
mo khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec to query by classification
parent
b3a5416b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
ee/spec/controllers/projects/licenses_controller_spec.rb
ee/spec/controllers/projects/licenses_controller_spec.rb
+21
-0
No files found.
ee/spec/controllers/projects/licenses_controller_spec.rb
View file @
01c530de
...
...
@@ -172,6 +172,27 @@ describe Projects::LicensesController do
})
end
end
context
"when loading `allowed` software policies only"
do
before
do
get
:index
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
classification:
[
'allowed'
]
},
format: :json
end
it
{
expect
(
response
).
to
have_http_status
(
:ok
)
}
it
{
expect
(
json_response
[
"licenses"
].
count
).
to
be
(
1
)
}
it
'includes only `allowed` policies'
do
expect
(
json_response
.
dig
(
"licenses"
,
0
)).
to
include
({
"id"
=>
other_license_policy
.
id
,
"spdx_identifier"
=>
"Other-Id"
,
"classification"
=>
"allowed"
})
end
end
end
context
'without existing report'
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