Commit 8449665f authored by Sean McGivern's avatar Sean McGivern

Merge branch 'refactor-pypi-license-specs' into 'master'

Refactor pypi license specs

See merge request gitlab-org/gitlab!38460
parents 2f084e3c 6812a974
......@@ -17,7 +17,6 @@ RSpec.describe API::PypiPackages do
subject { get api(url) }
context 'without the need for a license' do
context 'with valid project' do
using RSpec::Parameterized::TableSyntax
......@@ -60,7 +59,6 @@ RSpec.describe API::PypiPackages do
it_behaves_like 'rejects PyPI access with unknown project id'
end
end
describe 'POST /api/v4/projects/:id/packages/pypi/authorize' do
let_it_be(:workhorse_token) { JWT.encode({ 'iss' => 'gitlab-workhorse' }, Gitlab::Workhorse.secret, 'HS256') }
......@@ -70,7 +68,6 @@ RSpec.describe API::PypiPackages do
subject { post api(url), headers: headers }
context 'without the need for a license' do
context 'with valid project' do
using RSpec::Parameterized::TableSyntax
......@@ -112,7 +109,6 @@ RSpec.describe API::PypiPackages do
it_behaves_like 'rejects PyPI access with unknown project id'
end
end
describe 'POST /api/v4/projects/:id/packages/pypi' do
let(:workhorse_token) { JWT.encode({ 'iss' => 'gitlab-workhorse' }, Gitlab::Workhorse.secret, 'HS256') }
......@@ -135,7 +131,6 @@ RSpec.describe API::PypiPackages do
)
end
context 'without the need for a license' do
context 'with valid project' do
using RSpec::Parameterized::TableSyntax
......@@ -190,7 +185,6 @@ RSpec.describe API::PypiPackages do
it_behaves_like 'rejects PyPI access with unknown project id'
end
end
describe 'GET /api/v4/projects/:id/packages/pypi/files/:sha256/*file_identifier' do
let_it_be(:package_name) { 'Dummy-Package' }
......@@ -200,7 +194,6 @@ RSpec.describe API::PypiPackages do
subject { get api(url) }
context 'without the need for a license' do
context 'with valid project' do
using RSpec::Parameterized::TableSyntax
......@@ -255,5 +248,4 @@ RSpec.describe API::PypiPackages do
it_behaves_like 'rejects PyPI access with unknown project id'
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment