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
ad7f54d1
Commit
ad7f54d1
authored
Aug 03, 2020
by
Giorgenes Gelatti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor composer license specs
Remove license context in composer specs since license is no longer needed.
parent
f495e00a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
166 additions
and
176 deletions
+166
-176
spec/requests/api/composer_packages_spec.rb
spec/requests/api/composer_packages_spec.rb
+166
-176
No files found.
spec/requests/api/composer_packages_spec.rb
View file @
ad7f54d1
...
...
@@ -16,7 +16,6 @@ RSpec.describe API::ComposerPackages do
subject
{
get
api
(
url
),
headers:
headers
}
context
'without the need for a license'
do
context
'with valid project'
do
let!
(
:package
)
{
create
(
:composer_package
,
:with_metadatum
,
project:
project
)
}
...
...
@@ -52,7 +51,6 @@ RSpec.describe API::ComposerPackages do
it_behaves_like
'rejects Composer access with unknown group id'
end
end
describe
'GET /api/v4/group/:id/-/packages/composer/p/:sha.json'
do
let
(
:sha
)
{
'123'
}
...
...
@@ -61,7 +59,6 @@ RSpec.describe API::ComposerPackages do
subject
{
get
api
(
url
),
headers:
headers
}
context
'without the need for a license'
do
context
'with valid project'
do
using
RSpec
::
Parameterized
::
TableSyntax
...
...
@@ -95,7 +92,6 @@ RSpec.describe API::ComposerPackages do
it_behaves_like
'rejects Composer access with unknown group id'
end
end
describe
'GET /api/v4/group/:id/-/packages/composer/*package_name.json'
do
let
(
:package_name
)
{
'foobar'
}
...
...
@@ -103,7 +99,6 @@ RSpec.describe API::ComposerPackages do
subject
{
get
api
(
url
),
headers:
headers
}
context
'without the need for a license'
do
context
'with no packages'
do
include_context
'Composer user type'
,
:developer
,
true
do
it_behaves_like
'returning response status'
,
:not_found
...
...
@@ -145,7 +140,6 @@ RSpec.describe API::ComposerPackages do
it_behaves_like
'rejects Composer access with unknown group id'
end
end
describe
'POST /api/v4/projects/:id/packages/composer'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/composer"
}
...
...
@@ -158,7 +152,6 @@ RSpec.describe API::ComposerPackages do
subject
{
post
api
(
url
),
headers:
headers
,
params:
params
}
shared_examples
'composer package publish'
do
context
'without the need for a license'
do
context
'with valid project'
do
using
RSpec
::
Parameterized
::
TableSyntax
...
...
@@ -192,7 +185,6 @@ RSpec.describe API::ComposerPackages do
it_behaves_like
'rejects Composer access with unknown project id'
end
end
context
'with no tag or branch params'
do
let
(
:headers
)
{
build_basic_auth_header
(
user
.
username
,
personal_access_token
.
token
)
}
...
...
@@ -238,7 +230,6 @@ RSpec.describe API::ComposerPackages do
subject
{
get
api
(
url
),
headers:
headers
,
params:
params
}
context
'without the need for a license'
do
context
'with valid project'
do
let!
(
:package
)
{
create
(
:composer_package
,
:with_metadatum
,
name:
package_name
,
project:
project
)
}
...
...
@@ -298,5 +289,4 @@ RSpec.describe API::ComposerPackages do
it_behaves_like
'rejects Composer access with unknown project id'
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