diff options
Diffstat (limited to 'spec/lib/api/entities')
-rw-r--r-- | spec/lib/api/entities/bulk_imports/entity_spec.rb | 1 | ||||
-rw-r--r-- | spec/lib/api/entities/ci/job_request/image_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/api/entities/ci/job_request/port_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/api/entities/ci/job_request/service_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/api/entities/project_spec.rb | 13 |
5 files changed, 17 insertions, 3 deletions
diff --git a/spec/lib/api/entities/bulk_imports/entity_spec.rb b/spec/lib/api/entities/bulk_imports/entity_spec.rb index f91ae1fc5a1..4de85862ab9 100644 --- a/spec/lib/api/entities/bulk_imports/entity_spec.rb +++ b/spec/lib/api/entities/bulk_imports/entity_spec.rb @@ -14,6 +14,7 @@ RSpec.describe API::Entities::BulkImports::Entity do :status, :source_full_path, :destination_name, + :destination_slug, :destination_namespace, :parent_id, :namespace_id, diff --git a/spec/lib/api/entities/ci/job_request/image_spec.rb b/spec/lib/api/entities/ci/job_request/image_spec.rb index 3ab14ffc3ae..fca3b5d3fa9 100644 --- a/spec/lib/api/entities/ci/job_request/image_spec.rb +++ b/spec/lib/api/entities/ci/job_request/image_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe API::Entities::Ci::JobRequest::Image do - let(:ports) { [{ number: 80, protocol: 'http', name: 'name' }]} + let(:ports) { [{ number: 80, protocol: 'http', name: 'name' }] } let(:image) { double(name: 'image_name', entrypoint: ['foo'], ports: ports, pull_policy: ['if-not-present']) } let(:entity) { described_class.new(image) } diff --git a/spec/lib/api/entities/ci/job_request/port_spec.rb b/spec/lib/api/entities/ci/job_request/port_spec.rb index 8e0d2cabcfc..3f2ca3275c1 100644 --- a/spec/lib/api/entities/ci/job_request/port_spec.rb +++ b/spec/lib/api/entities/ci/job_request/port_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe ::API::Entities::Ci::JobRequest::Port do - let(:port) { double(number: 80, protocol: 'http', name: 'name')} + let(:port) { double(number: 80, protocol: 'http', name: 'name') } let(:entity) { described_class.new(port) } subject { entity.as_json } diff --git a/spec/lib/api/entities/ci/job_request/service_spec.rb b/spec/lib/api/entities/ci/job_request/service_spec.rb index 47c2c4e04c9..86f2120c321 100644 --- a/spec/lib/api/entities/ci/job_request/service_spec.rb +++ b/spec/lib/api/entities/ci/job_request/service_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe API::Entities::Ci::JobRequest::Service do - let(:ports) { [{ number: 80, protocol: 'http', name: 'name' }]} + let(:ports) { [{ number: 80, protocol: 'http', name: 'name' }] } let(:service) do instance_double( ::Gitlab::Ci::Build::Image, diff --git a/spec/lib/api/entities/project_spec.rb b/spec/lib/api/entities/project_spec.rb index 6b542278fa6..f4073683919 100644 --- a/spec/lib/api/entities/project_spec.rb +++ b/spec/lib/api/entities/project_spec.rb @@ -13,6 +13,19 @@ RSpec.describe ::API::Entities::Project do subject(:json) { entity.as_json } + context 'without project feature' do + before do + project.project_feature.destroy! + project.reload + end + + it 'returns a response' do + expect(json[:issues_access_level]).to be_nil + expect(json[:repository_access_level]).to be_nil + expect(json[:merge_requests_access_level]).to be_nil + end + end + describe '.service_desk_address' do before do allow(project).to receive(:service_desk_enabled?).and_return(true) |