diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
commit | b39512ed755239198a9c294b6a45e65c05900235 (patch) | |
tree | d234a3efade1de67c46b9e5a38ce813627726aa7 /spec/services/projects | |
parent | d31474cf3b17ece37939d20082b07f6657cc79a9 (diff) |
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'spec/services/projects')
17 files changed, 249 insertions, 48 deletions
diff --git a/spec/services/projects/after_rename_service_spec.rb b/spec/services/projects/after_rename_service_spec.rb index 9dc15131bc5..edf4bbe0f7f 100644 --- a/spec/services/projects/after_rename_service_spec.rb +++ b/spec/services/projects/after_rename_service_spec.rb @@ -3,7 +3,6 @@ require 'spec_helper' RSpec.describe Projects::AfterRenameService do - let(:rugged_config) { rugged_repo(project.repository).config } let(:legacy_storage) { Storage::LegacyProject.new(project) } let(:hashed_storage) { Storage::Hashed.new(project) } let!(:path_before_rename) { project.path } @@ -71,10 +70,10 @@ RSpec.describe Projects::AfterRenameService do end end - it 'updates project full path in .git/config' do + it 'updates project full path in gitaly' do service_execute - expect(rugged_config['gitlab.fullpath']).to eq(project.full_path) + expect(project.repository.full_path).to eq(project.full_path) end it 'updates storage location' do @@ -173,10 +172,10 @@ RSpec.describe Projects::AfterRenameService do end end - it 'updates project full path in .git/config' do + it 'updates project full path in gitaly' do service_execute - expect(rugged_config['gitlab.fullpath']).to eq(project.full_path) + expect(project.repository.full_path).to eq(project.full_path) end it 'updates storage location' do diff --git a/spec/services/projects/alerting/notify_service_spec.rb b/spec/services/projects/alerting/notify_service_spec.rb index feae8f3967c..aa2ef39bf98 100644 --- a/spec/services/projects/alerting/notify_service_spec.rb +++ b/spec/services/projects/alerting/notify_service_spec.rb @@ -56,6 +56,7 @@ RSpec.describe Projects::Alerting::NotifyService do it_behaves_like 'processes new firing alert' it_behaves_like 'properly assigns the alert properties' + include_examples 'handles race condition in alert creation' it 'passes the integration to alert processing' do expect(Gitlab::AlertManagement::Payload) @@ -118,10 +119,10 @@ RSpec.describe Projects::Alerting::NotifyService do end context 'with overlong payload' do - let(:deep_size_object) { instance_double(Gitlab::Utils::DeepSize, valid?: false) } + let(:payload_raw) { { 'the-payload-is-too-big' => true } } before do - allow(Gitlab::Utils::DeepSize).to receive(:new).and_return(deep_size_object) + stub_const('::Gitlab::Utils::DeepSize::DEFAULT_MAX_DEPTH', 0) end it_behaves_like 'alerts service responds with an error and takes no actions', :bad_request diff --git a/spec/services/projects/container_repository/third_party/delete_tags_service_spec.rb b/spec/services/projects/container_repository/third_party/delete_tags_service_spec.rb index 22cada7816b..4de36452684 100644 --- a/spec/services/projects/container_repository/third_party/delete_tags_service_spec.rb +++ b/spec/services/projects/container_repository/third_party/delete_tags_service_spec.rb @@ -58,7 +58,7 @@ RSpec.describe Projects::ContainerRepository::ThirdParty::DeleteTagsService do stub_put_manifest_request('Ba', 500, {}) end - it { is_expected.to eq(status: :error, message: "could not delete tags: #{tags.join(', ')}")} + it { is_expected.to eq(status: :error, message: "could not delete tags: #{tags.join(', ')}") } context 'when a large list of tag updates fails' do let(:tags) { Array.new(1000) { |i| "tag_#{i}" } } diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb index 59dee209ff9..e112c1e2497 100644 --- a/spec/services/projects/create_service_spec.rb +++ b/spec/services/projects/create_service_spec.rb @@ -4,7 +4,6 @@ require 'spec_helper' RSpec.describe Projects::CreateService, '#execute' do include ExternalAuthorizationServiceHelpers - include GitHelpers let(:user) { create :user } let(:project_name) { 'GitLab' } @@ -254,6 +253,39 @@ RSpec.describe Projects::CreateService, '#execute' do end end + context 'user with project limit' do + let_it_be(:user_with_projects_limit) { create(:user, projects_limit: 0) } + + let(:params) { opts.merge!(namespace_id: target_namespace.id) } + + subject(:project) { create_project(user_with_projects_limit, params) } + + context 'under personal namespace' do + let(:target_namespace) { user_with_projects_limit.namespace } + + it 'cannot create a project' do + expect(project.errors.errors.length).to eq 1 + expect(project.errors.messages[:limit_reached].first).to eq(_('Personal project creation is not allowed. Please contact your administrator with questions')) + end + end + + context 'under group namespace' do + let_it_be(:group) do + create(:group).tap do |group| + group.add_owner(user_with_projects_limit) + end + end + + let(:target_namespace) { group } + + it 'can create a project' do + expect(project).to be_valid + expect(project).to be_saved + expect(project.errors.errors.length).to eq 0 + end + end + end + context 'membership overrides', :sidekiq_inline do let_it_be(:group) { create(:group, :private) } let_it_be(:subgroup_for_projects) { create(:group, :private, parent: group) } @@ -769,11 +801,10 @@ RSpec.describe Projects::CreateService, '#execute' do create_project(user, opts) end - it 'writes project full path to .git/config' do + it 'writes project full path to gitaly' do project = create_project(user, opts) - rugged = rugged_repo(project.repository) - expect(rugged.config['gitlab.fullpath']).to eq project.full_path + expect(project.repository.full_path).to eq project.full_path end it 'triggers PostCreationWorker' do diff --git a/spec/services/projects/enable_deploy_key_service_spec.rb b/spec/services/projects/enable_deploy_key_service_spec.rb index f297ec374cf..c0b3992037e 100644 --- a/spec/services/projects/enable_deploy_key_service_spec.rb +++ b/spec/services/projects/enable_deploy_key_service_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe Projects::EnableDeployKeyService do let(:deploy_key) { create(:deploy_key, public: true) } let(:project) { create(:project) } - let(:user) { project.creator} + let(:user) { project.creator } let!(:params) { { key_id: deploy_key.id } } it 'enables the key' do diff --git a/spec/services/projects/hashed_storage/migrate_repository_service_spec.rb b/spec/services/projects/hashed_storage/migrate_repository_service_spec.rb index d0064873972..65da1976dc2 100644 --- a/spec/services/projects/hashed_storage/migrate_repository_service_spec.rb +++ b/spec/services/projects/hashed_storage/migrate_repository_service_spec.rb @@ -68,12 +68,10 @@ RSpec.describe Projects::HashedStorage::MigrateRepositoryService do service.execute end - it 'writes project full path to .git/config' do + it 'writes project full path to gitaly' do service.execute - rugged_config = rugged_repo(project.repository).config['gitlab.fullpath'] - - expect(rugged_config).to eq project.full_path + expect(project.repository.full_path).to eq project.full_path end end diff --git a/spec/services/projects/hashed_storage/rollback_repository_service_spec.rb b/spec/services/projects/hashed_storage/rollback_repository_service_spec.rb index 23e776b72bc..385c03e6308 100644 --- a/spec/services/projects/hashed_storage/rollback_repository_service_spec.rb +++ b/spec/services/projects/hashed_storage/rollback_repository_service_spec.rb @@ -3,8 +3,6 @@ require 'spec_helper' RSpec.describe Projects::HashedStorage::RollbackRepositoryService, :clean_gitlab_redis_shared_state do - include GitHelpers - let(:gitlab_shell) { Gitlab::Shell.new } let(:project) { create(:project, :repository, :wiki_repo, :design_repo, storage_version: ::Project::HASHED_STORAGE_FEATURES[:repository]) } let(:legacy_storage) { Storage::LegacyProject.new(project) } @@ -68,12 +66,10 @@ RSpec.describe Projects::HashedStorage::RollbackRepositoryService, :clean_gitlab service.execute end - it 'writes project full path to .git/config' do + it 'writes project full path to gitaly' do service.execute - rugged_config = rugged_repo(project.repository).config['gitlab.fullpath'] - - expect(rugged_config).to eq project.full_path + expect(project.repository.full_path).to eq project.full_path end end diff --git a/spec/services/projects/import_export/export_service_spec.rb b/spec/services/projects/import_export/export_service_spec.rb index 54abbc04084..285687505e9 100644 --- a/spec/services/projects/import_export/export_service_spec.rb +++ b/spec/services/projects/import_export/export_service_spec.rb @@ -89,7 +89,21 @@ RSpec.describe Projects::ImportExport::ExportService do context 'when all saver services succeed' do before do - allow(service).to receive(:save_services).and_return(true) + allow(service).to receive(:save_exporters).and_return(true) + end + + it 'logs a successful message' do + allow(Gitlab::ImportExport::Saver).to receive(:save).and_return(true) + + expect(service.instance_variable_get(:@logger)).to receive(:info).ordered.with( + hash_including({ message: 'Project export started', project_id: project.id }) + ) + + expect(service.instance_variable_get(:@logger)).to receive(:info).ordered.with( + hash_including({ message: 'Project successfully exported', project_id: project.id }) + ) + + service.execute end it 'saves the project in the file system' do @@ -111,6 +125,7 @@ RSpec.describe Projects::ImportExport::ExportService do end it 'calls the after export strategy' do + allow(Gitlab::ImportExport::Saver).to receive(:save).and_return(true) expect(after_export_strategy).to receive(:execute) service.execute(after_export_strategy) @@ -119,7 +134,7 @@ RSpec.describe Projects::ImportExport::ExportService do context 'when after export strategy fails' do before do allow(after_export_strategy).to receive(:execute).and_return(false) - expect(Gitlab::ImportExport::Saver).to receive(:save).with(exportable: project, shared: shared).and_return(true) + allow(Gitlab::ImportExport::Saver).to receive(:save).and_return(true) end after do @@ -140,7 +155,9 @@ RSpec.describe Projects::ImportExport::ExportService do end it 'notifies logger' do - expect(service.instance_variable_get(:@logger)).to receive(:error) + expect(service.instance_variable_get(:@logger)).to receive(:error).with( + hash_including({ message: 'Project export error', project_id: project.id }) + ) end end end diff --git a/spec/services/projects/import_export/relation_export_service_spec.rb b/spec/services/projects/import_export/relation_export_service_spec.rb new file mode 100644 index 00000000000..94f5653ee7d --- /dev/null +++ b/spec/services/projects/import_export/relation_export_service_spec.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Projects::ImportExport::RelationExportService do + using RSpec::Parameterized::TableSyntax + + subject(:service) { described_class.new(relation_export, 'jid') } + + let_it_be(:project_export_job) { create(:project_export_job) } + let_it_be(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" } + let_it_be(:archive_path) { "#{Dir.tmpdir}/project_archive_spec" } + + let(:relation_export) { create(:project_relation_export, relation: relation, project_export_job: project_export_job) } + + before do + stub_uploads_object_storage(ImportExportUploader, enabled: false) + + allow(project_export_job.project.import_export_shared).to receive(:export_path).and_return(export_path) + allow(project_export_job.project.import_export_shared).to receive(:archive_path).and_return(archive_path) + allow(FileUtils).to receive(:remove_entry).with(any_args).and_call_original + end + + describe '#execute' do + let(:relation) { 'labels' } + + it 'removes temporary paths used to export files' do + expect(FileUtils).to receive(:remove_entry).with(export_path) + expect(FileUtils).to receive(:remove_entry).with(archive_path) + + service.execute + end + + context 'when saver fails to export relation' do + before do + allow_next_instance_of(Gitlab::ImportExport::Project::RelationSaver) do |saver| + allow(saver).to receive(:save).and_return(false) + end + end + + it 'flags export as failed' do + service.execute + + expect(relation_export.failed?).to eq(true) + end + + it 'logs failed message' do + expect_next_instance_of(Gitlab::Export::Logger) do |logger| + expect(logger).to receive(:error).with( + export_error: '', + message: 'Project relation export failed', + project_export_job_id: project_export_job.id, + project_id: project_export_job.project.id, + project_name: project_export_job.project.name + ) + end + + service.execute + end + end + + context 'when an exception is raised' do + before do + allow_next_instance_of(Gitlab::ImportExport::Project::RelationSaver) do |saver| + allow(saver).to receive(:save).and_raise('Error!') + end + end + + it 'flags export as failed' do + service.execute + + expect(relation_export.failed?).to eq(true) + expect(relation_export.export_error).to eq('Error!') + end + + it 'logs exception error message' do + expect_next_instance_of(Gitlab::Export::Logger) do |logger| + expect(logger).to receive(:error).with( + export_error: 'Error!', + message: 'Project relation export failed', + project_export_job_id: project_export_job.id, + project_id: project_export_job.project.id, + project_name: project_export_job.project.name + ) + end + + service.execute + end + end + + describe 'relation name and saver class' do + where(:relation_name, :saver) do + Projects::ImportExport::RelationExport::UPLOADS_RELATION | Gitlab::ImportExport::UploadsSaver + Projects::ImportExport::RelationExport::REPOSITORY_RELATION | Gitlab::ImportExport::RepoSaver + Projects::ImportExport::RelationExport::WIKI_REPOSITORY_RELATION | Gitlab::ImportExport::WikiRepoSaver + Projects::ImportExport::RelationExport::LFS_OBJECTS_RELATION | Gitlab::ImportExport::LfsSaver + Projects::ImportExport::RelationExport::SNIPPETS_REPOSITORY_RELATION | Gitlab::ImportExport::SnippetsRepoSaver + Projects::ImportExport::RelationExport::DESIGN_REPOSITORY_RELATION | Gitlab::ImportExport::DesignRepoSaver + Projects::ImportExport::RelationExport::ROOT_RELATION | Gitlab::ImportExport::Project::RelationSaver + 'labels' | Gitlab::ImportExport::Project::RelationSaver + end + + with_them do + let(:relation) { relation_name } + + it 'exports relation using correct saver' do + expect(saver).to receive(:new).and_call_original + + service.execute + end + + it 'assigns finished status and relation file' do + service.execute + + expect(relation_export.finished?).to eq(true) + expect(relation_export.upload.export_file.filename).to eq("#{relation}.tar.gz") + end + end + end + end +end diff --git a/spec/services/projects/lfs_pointers/lfs_download_link_list_service_spec.rb b/spec/services/projects/lfs_pointers/lfs_download_link_list_service_spec.rb index 047ebe65dff..d472d6493c3 100644 --- a/spec/services/projects/lfs_pointers/lfs_download_link_list_service_spec.rb +++ b/spec/services/projects/lfs_pointers/lfs_download_link_list_service_spec.rb @@ -6,7 +6,7 @@ RSpec.describe Projects::LfsPointers::LfsDownloadLinkListService do let(:lfs_endpoint) { "#{import_url}/info/lfs/objects/batch" } let!(:project) { create(:project, import_url: import_url) } let(:new_oids) { { 'oid1' => 123, 'oid2' => 125 } } - let(:headers) { { 'X-Some-Header' => '456' }} + let(:headers) { { 'X-Some-Header' => '456' } } let(:remote_uri) { URI.parse(lfs_endpoint) } let(:request_object) { HTTParty::Request.new(Net::HTTP::Post, '/') } diff --git a/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb b/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb index 04c6349bf52..b67b4d64c1d 100644 --- a/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb +++ b/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb @@ -250,7 +250,7 @@ RSpec.describe Projects::LfsPointers::LfsDownloadService do end context 'that is not blocked' do - let(:redirect_link) { "http://example.com/"} + let(:redirect_link) { "http://example.com/" } before do stub_full_request(download_link).to_return(status: 301, headers: { 'Location' => redirect_link }) diff --git a/spec/services/projects/lfs_pointers/lfs_object_download_list_service_spec.rb b/spec/services/projects/lfs_pointers/lfs_object_download_list_service_spec.rb index 981d7027a17..adcc2b85706 100644 --- a/spec/services/projects/lfs_pointers/lfs_object_download_list_service_spec.rb +++ b/spec/services/projects/lfs_pointers/lfs_object_download_list_service_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' RSpec.describe Projects::LfsPointers::LfsObjectDownloadListService do let(:import_url) { 'http://www.gitlab.com/demo/repo.git' } - let(:default_endpoint) { "#{import_url}/info/lfs/objects/batch"} - let(:group) { create(:group, lfs_enabled: true)} + let(:default_endpoint) { "#{import_url}/info/lfs/objects/batch" } + let(:group) { create(:group, lfs_enabled: true) } let!(:project) { create(:project, namespace: group, import_url: import_url, lfs_enabled: true) } let!(:lfs_objects_project) { create_list(:lfs_objects_project, 2, project: project) } let!(:existing_lfs_objects) { LfsObject.pluck(:oid, :size).to_h } @@ -75,7 +75,7 @@ RSpec.describe Projects::LfsPointers::LfsObjectDownloadListService do end context 'when import url has credentials' do - let(:import_url) { 'http://user:password@www.gitlab.com/demo/repo.git'} + let(:import_url) { 'http://user:password@www.gitlab.com/demo/repo.git' } it 'adds the credentials to the new endpoint' do expect(Projects::LfsPointers::LfsDownloadLinkListService) diff --git a/spec/services/projects/participants_service_spec.rb b/spec/services/projects/participants_service_spec.rb index 61edfd23700..fc745cd669f 100644 --- a/spec/services/projects/participants_service_spec.rb +++ b/spec/services/projects/participants_service_spec.rb @@ -107,7 +107,7 @@ RSpec.describe Projects::ParticipantsService do shared_examples 'return project members' do context 'when there is a project in group namespace' do let_it_be(:public_group) { create(:group, :public) } - let_it_be(:public_project) { create(:project, :public, namespace: public_group)} + let_it_be(:public_project) { create(:project, :public, namespace: public_group) } let_it_be(:public_group_owner) { create(:user) } @@ -125,9 +125,9 @@ RSpec.describe Projects::ParticipantsService do context 'when there is a private group and a public project' do let_it_be(:public_group) { create(:group, :public) } let_it_be(:private_group) { create(:group, :private, :nested) } - let_it_be(:public_project) { create(:project, :public, namespace: public_group)} + let_it_be(:public_project) { create(:project, :public, namespace: public_group) } - let_it_be(:project_issue) { create(:issue, project: public_project)} + let_it_be(:project_issue) { create(:issue, project: public_project) } let_it_be(:public_group_owner) { create(:user) } let_it_be(:private_group_member) { create(:user) } diff --git a/spec/services/projects/prometheus/alerts/notify_service_spec.rb b/spec/services/projects/prometheus/alerts/notify_service_spec.rb index 6f760e6dbfa..7bf6dfd0fd8 100644 --- a/spec/services/projects/prometheus/alerts/notify_service_spec.rb +++ b/spec/services/projects/prometheus/alerts/notify_service_spec.rb @@ -177,6 +177,7 @@ RSpec.describe Projects::Prometheus::Alerts::NotifyService do end it { is_expected.to be_success } + include_examples 'does not send alert notification emails' include_examples 'does not process incident issues' end @@ -187,6 +188,7 @@ RSpec.describe Projects::Prometheus::Alerts::NotifyService do end it { is_expected.to be_success } + include_examples 'does not send alert notification emails' end @@ -196,6 +198,7 @@ RSpec.describe Projects::Prometheus::Alerts::NotifyService do end it { is_expected.to be_success } + include_examples 'does not process incident issues' end end @@ -313,11 +316,11 @@ RSpec.describe Projects::Prometheus::Alerts::NotifyService do end context 'when the payload is too big' do - let(:payload) { { 'the-payload-is-too-big' => true } } - let(:deep_size_object) { instance_double(Gitlab::Utils::DeepSize, valid?: false) } + let(:payload_raw) { { 'the-payload-is-too-big' => true } } + let(:payload) { ActionController::Parameters.new(payload_raw).permit! } before do - allow(Gitlab::Utils::DeepSize).to receive(:new).and_return(deep_size_object) + stub_const('::Gitlab::Utils::DeepSize::DEFAULT_MAX_DEPTH', 0) end it_behaves_like 'alerts service responds with an error and takes no actions', :bad_request diff --git a/spec/services/projects/transfer_service_spec.rb b/spec/services/projects/transfer_service_spec.rb index ecf9f92d74f..8f505c31c5a 100644 --- a/spec/services/projects/transfer_service_spec.rb +++ b/spec/services/projects/transfer_service_spec.rb @@ -3,8 +3,6 @@ require 'spec_helper' RSpec.describe Projects::TransferService do - include GitHelpers - let_it_be(:group) { create(:group) } let_it_be(:user) { create(:user) } let_it_be(:group_integration) { create(:integrations_slack, :group, group: group, webhook: 'http://group.slack.com') } @@ -64,6 +62,30 @@ RSpec.describe Projects::TransferService do expect(project.namespace).to eq(group) end + context 'EventStore' do + let(:group) do + create(:group, :nested).tap { |g| g.add_owner(user) } + end + + let(:target) do + create(:group, :nested).tap { |g| g.add_owner(user) } + end + + let(:project) { create(:project, namespace: group) } + + it 'publishes a ProjectTransferedEvent' do + expect { execute_transfer } + .to publish_event(Projects::ProjectTransferedEvent) + .with( + project_id: project.id, + old_namespace_id: group.id, + old_root_namespace_id: group.root_ancestor.id, + new_namespace_id: target.id, + new_root_namespace_id: target.root_ancestor.id + ) + end + end + context 'when project has an associated project namespace' do it 'keeps project namespace in sync with project' do transfer_result = execute_transfer @@ -178,10 +200,10 @@ RSpec.describe Projects::TransferService do expect(project.disk_path).to start_with(group.path) end - it 'updates project full path in .git/config' do + it 'updates project full path in gitaly' do execute_transfer - expect(rugged_config['gitlab.fullpath']).to eq "#{group.full_path}/#{project.path}" + expect(project.repository.full_path).to eq "#{group.full_path}/#{project.path}" end it 'updates storage location' do @@ -272,10 +294,10 @@ RSpec.describe Projects::TransferService do expect(original_path).to eq current_path end - it 'rolls back project full path in .git/config' do + it 'rolls back project full path in gitaly' do attempt_project_transfer - expect(rugged_config['gitlab.fullpath']).to eq project.full_path + expect(project.repository.full_path).to eq project.full_path end it "doesn't send move notifications" do @@ -299,6 +321,11 @@ RSpec.describe Projects::TransferService do ) end + it 'does not publish a ProjectTransferedEvent' do + expect { attempt_project_transfer } + .not_to publish_event(Projects::ProjectTransferedEvent) + end + context 'when project has pending builds', :sidekiq_inline do let!(:other_project) { create(:project) } let!(:pending_build) { create(:ci_pending_build, project: project.reload) } @@ -741,10 +768,6 @@ RSpec.describe Projects::TransferService do end end - def rugged_config - rugged_repo(project.repository).config - end - def project_namespace_in_sync(group) project.reload expect(project.namespace).to eq(group) diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb index ca838be0fa8..85d3e99109d 100644 --- a/spec/services/projects/update_service_spec.rb +++ b/spec/services/projects/update_service_spec.rb @@ -348,6 +348,18 @@ RSpec.describe Projects::UpdateService do end end + context 'when archiving a project' do + it 'publishes a ProjectTransferedEvent' do + expect { update_project(project, user, archived: true) } + .to publish_event(Projects::ProjectArchivedEvent) + .with( + project_id: project.id, + namespace_id: project.namespace_id, + root_namespace_id: project.root_namespace.id + ) + end + end + context 'when changing operations feature visibility' do let(:feature_params) { { operations_access_level: ProjectFeature::DISABLED } } diff --git a/spec/services/projects/update_statistics_service_spec.rb b/spec/services/projects/update_statistics_service_spec.rb index 6987185b549..1cc69e7e2fe 100644 --- a/spec/services/projects/update_statistics_service_spec.rb +++ b/spec/services/projects/update_statistics_service_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe Projects::UpdateStatisticsService do using RSpec::Parameterized::TableSyntax - let(:service) { described_class.new(project, nil, statistics: statistics)} + let(:service) { described_class.new(project, nil, statistics: statistics) } let(:statistics) { %w(repository_size) } describe '#execute' do |