diff options
Diffstat (limited to 'spec/requests/api/projects_spec.rb')
-rw-r--r-- | spec/requests/api/projects_spec.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 349101a092f..bb96771b3d5 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -46,7 +46,7 @@ RSpec.shared_examples 'languages and percentages JSON response' do end end -RSpec.describe API::Projects, :aggregate_failures, feature_category: :projects do +RSpec.describe API::Projects, :aggregate_failures, feature_category: :groups_and_projects do include ProjectForksHelper include WorkhorseHelpers include StubRequests @@ -2158,7 +2158,7 @@ RSpec.describe API::Projects, :aggregate_failures, feature_category: :projects d end shared_examples 'capped upload attachments' do |upload_allowed| - it "limits the upload to 1 GB" do + it "limits the upload to 1 GiB" do expect_next_instance_of(UploadService) do |instance| expect(instance).to receive(:override_max_attachment_size=).with(1.gigabyte).and_call_original end @@ -5154,7 +5154,7 @@ RSpec.describe API::Projects, :aggregate_failures, feature_category: :projects d it 'includes groups where the user has permissions to transfer a project to' do request - expect(project_ids_from_response).to include(maintainer_group.id, owner_group.id) + expect(project_ids_from_response).to match_array [maintainer_group.id, owner_group.id] end it 'does not include groups where the user doesn not have permissions to transfer a project' do @@ -5163,6 +5163,12 @@ RSpec.describe API::Projects, :aggregate_failures, feature_category: :projects d expect(project_ids_from_response).not_to include(guest_group.id) end + it 'does not include the group id of the current project' do + request + + expect(project_ids_from_response).not_to include(project.group.id) + end + context 'with search' do let(:params) { { search: 'maintainer' } } |