Commit ad7f54d1 authored by Giorgenes Gelatti's avatar Giorgenes Gelatti

Refactor composer license specs

Remove license context in composer
specs since license is no longer
needed.
parent f495e00a
...@@ -16,7 +16,6 @@ RSpec.describe API::ComposerPackages do ...@@ -16,7 +16,6 @@ RSpec.describe API::ComposerPackages do
subject { get api(url), headers: headers } subject { get api(url), headers: headers }
context 'without the need for a license' do
context 'with valid project' do context 'with valid project' do
let!(:package) { create(:composer_package, :with_metadatum, project: project) } let!(:package) { create(:composer_package, :with_metadatum, project: project) }
...@@ -52,7 +51,6 @@ RSpec.describe API::ComposerPackages do ...@@ -52,7 +51,6 @@ RSpec.describe API::ComposerPackages do
it_behaves_like 'rejects Composer access with unknown group id' it_behaves_like 'rejects Composer access with unknown group id'
end end
end
describe 'GET /api/v4/group/:id/-/packages/composer/p/:sha.json' do describe 'GET /api/v4/group/:id/-/packages/composer/p/:sha.json' do
let(:sha) { '123' } let(:sha) { '123' }
...@@ -61,7 +59,6 @@ RSpec.describe API::ComposerPackages do ...@@ -61,7 +59,6 @@ RSpec.describe API::ComposerPackages do
subject { get api(url), headers: headers } subject { get api(url), headers: headers }
context 'without the need for a license' do
context 'with valid project' do context 'with valid project' do
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
...@@ -95,7 +92,6 @@ RSpec.describe API::ComposerPackages do ...@@ -95,7 +92,6 @@ RSpec.describe API::ComposerPackages do
it_behaves_like 'rejects Composer access with unknown group id' it_behaves_like 'rejects Composer access with unknown group id'
end end
end
describe 'GET /api/v4/group/:id/-/packages/composer/*package_name.json' do describe 'GET /api/v4/group/:id/-/packages/composer/*package_name.json' do
let(:package_name) { 'foobar' } let(:package_name) { 'foobar' }
...@@ -103,7 +99,6 @@ RSpec.describe API::ComposerPackages do ...@@ -103,7 +99,6 @@ RSpec.describe API::ComposerPackages do
subject { get api(url), headers: headers } subject { get api(url), headers: headers }
context 'without the need for a license' do
context 'with no packages' do context 'with no packages' do
include_context 'Composer user type', :developer, true do include_context 'Composer user type', :developer, true do
it_behaves_like 'returning response status', :not_found it_behaves_like 'returning response status', :not_found
...@@ -145,7 +140,6 @@ RSpec.describe API::ComposerPackages do ...@@ -145,7 +140,6 @@ RSpec.describe API::ComposerPackages do
it_behaves_like 'rejects Composer access with unknown group id' it_behaves_like 'rejects Composer access with unknown group id'
end end
end
describe 'POST /api/v4/projects/:id/packages/composer' do describe 'POST /api/v4/projects/:id/packages/composer' do
let(:url) { "/projects/#{project.id}/packages/composer" } let(:url) { "/projects/#{project.id}/packages/composer" }
...@@ -158,7 +152,6 @@ RSpec.describe API::ComposerPackages do ...@@ -158,7 +152,6 @@ RSpec.describe API::ComposerPackages do
subject { post api(url), headers: headers, params: params } subject { post api(url), headers: headers, params: params }
shared_examples 'composer package publish' do shared_examples 'composer package publish' do
context 'without the need for a license' do
context 'with valid project' do context 'with valid project' do
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
...@@ -192,7 +185,6 @@ RSpec.describe API::ComposerPackages do ...@@ -192,7 +185,6 @@ RSpec.describe API::ComposerPackages do
it_behaves_like 'rejects Composer access with unknown project id' it_behaves_like 'rejects Composer access with unknown project id'
end end
end
context 'with no tag or branch params' do context 'with no tag or branch params' do
let(:headers) { build_basic_auth_header(user.username, personal_access_token.token) } let(:headers) { build_basic_auth_header(user.username, personal_access_token.token) }
...@@ -238,7 +230,6 @@ RSpec.describe API::ComposerPackages do ...@@ -238,7 +230,6 @@ RSpec.describe API::ComposerPackages do
subject { get api(url), headers: headers, params: params } subject { get api(url), headers: headers, params: params }
context 'without the need for a license' do
context 'with valid project' do context 'with valid project' do
let!(:package) { create(:composer_package, :with_metadatum, name: package_name, project: project) } let!(:package) { create(:composer_package, :with_metadatum, name: package_name, project: project) }
...@@ -298,5 +289,4 @@ RSpec.describe API::ComposerPackages do ...@@ -298,5 +289,4 @@ RSpec.describe API::ComposerPackages do
it_behaves_like 'rejects Composer access with unknown project id' it_behaves_like 'rejects Composer access with unknown project id'
end end
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