diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-21 13:48:12 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-21 13:48:12 +0000 |
commit | 0430b7644101fc70ed4be6bf69ccf05b900f4cdf (patch) | |
tree | 3ea258c4da6e0f9c6e0f7523191fdb0a64a15c73 /spec/services/projects | |
parent | 78ee24ba53a4a44d829613495ec0d5f1bbb5a9ee (diff) | |
download | gitlab-ce-0430b7644101fc70ed4be6bf69ccf05b900f4cdf.tar.gz |
Enable Style/DotPosition Rubocop :cop:
Diffstat (limited to 'spec/services/projects')
5 files changed, 26 insertions, 26 deletions
diff --git a/spec/services/projects/housekeeping_service_spec.rb b/spec/services/projects/housekeeping_service_spec.rb index fff12beed71..ebed802708d 100644 --- a/spec/services/projects/housekeeping_service_spec.rb +++ b/spec/services/projects/housekeeping_service_spec.rb @@ -66,14 +66,14 @@ describe Projects::HousekeepingService do allow(subject).to receive(:lease_key).and_return(:the_lease_key) # At push 200 - expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :gc, :the_lease_key, :the_uuid). - exactly(1).times + expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :gc, :the_lease_key, :the_uuid) + .exactly(1).times # At push 50, 100, 150 - expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :full_repack, :the_lease_key, :the_uuid). - exactly(3).times + expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :full_repack, :the_lease_key, :the_uuid) + .exactly(3).times # At push 10, 20, ... (except those above) - expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :incremental_repack, :the_lease_key, :the_uuid). - exactly(16).times + expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :incremental_repack, :the_lease_key, :the_uuid) + .exactly(16).times 201.times do subject.increment! diff --git a/spec/services/projects/import_service_spec.rb b/spec/services/projects/import_service_spec.rb index 44db299812f..e855de38037 100644 --- a/spec/services/projects/import_service_spec.rb +++ b/spec/services/projects/import_service_spec.rb @@ -111,11 +111,11 @@ describe Projects::ImportService, services: true do end it 'flushes various caches' do - allow_any_instance_of(Repository).to receive(:fetch_remote). - and_return(true) + allow_any_instance_of(Repository).to receive(:fetch_remote) + .and_return(true) - allow_any_instance_of(Gitlab::GithubImport::Importer).to receive(:execute). - and_return(true) + allow_any_instance_of(Gitlab::GithubImport::Importer).to receive(:execute) + .and_return(true) expect_any_instance_of(Repository).to receive(:expire_content_cache) diff --git a/spec/services/projects/propagate_service_template_spec.rb b/spec/services/projects/propagate_service_template_spec.rb index 8a6a9f09f74..a6d43c4f0f1 100644 --- a/spec/services/projects/propagate_service_template_spec.rb +++ b/spec/services/projects/propagate_service_template_spec.rb @@ -60,8 +60,8 @@ describe Projects::PropagateServiceTemplate, services: true do Service.build_from_template(project.id, service_template).save! Service.build_from_template(project.id, other_service).save! - expect { described_class.propagate(service_template) }. - not_to change { Service.count } + expect { described_class.propagate(service_template) } + .not_to change { Service.count } end it 'creates the service containing the template attributes' do @@ -90,8 +90,8 @@ describe Projects::PropagateServiceTemplate, services: true do it 'updates the project external tracker' do service_template.update!(category: 'issue_tracker', default: false) - expect { described_class.propagate(service_template) }. - to change { project.reload.has_external_issue_tracker }.to(true) + expect { described_class.propagate(service_template) } + .to change { project.reload.has_external_issue_tracker }.to(true) end end @@ -99,8 +99,8 @@ describe Projects::PropagateServiceTemplate, services: true do it 'updates the project external tracker' do service_template.update!(type: 'ExternalWikiService') - expect { described_class.propagate(service_template) }. - to change { project.reload.has_external_wiki }.to(true) + expect { described_class.propagate(service_template) } + .to change { project.reload.has_external_wiki }.to(true) end end end diff --git a/spec/services/projects/transfer_service_spec.rb b/spec/services/projects/transfer_service_spec.rb index 63bd0353d50..76c52d55ae5 100644 --- a/spec/services/projects/transfer_service_spec.rb +++ b/spec/services/projects/transfer_service_spec.rb @@ -7,10 +7,10 @@ describe Projects::TransferService, services: true do context 'namespace -> namespace' do before do - allow_any_instance_of(Gitlab::UploadsTransfer). - to receive(:move_project).and_return(true) - allow_any_instance_of(Gitlab::PagesTransfer). - to receive(:move_project).and_return(true) + allow_any_instance_of(Gitlab::UploadsTransfer) + .to receive(:move_project).and_return(true) + allow_any_instance_of(Gitlab::PagesTransfer) + .to receive(:move_project).and_return(true) group.add_owner(user) @result = transfer_project(project, user, group) end @@ -173,9 +173,9 @@ describe Projects::TransferService, services: true do end it 'only schedules a single job for every user' do - expect(UserProjectAccessChangedService).to receive(:new). - with([owner.id, group_member.id]). - and_call_original + expect(UserProjectAccessChangedService).to receive(:new) + .with([owner.id, group_member.id]) + .and_call_original transfer_project(project, owner, group) end diff --git a/spec/services/projects/unlink_fork_service_spec.rb b/spec/services/projects/unlink_fork_service_spec.rb index 23f5555d3e0..d34652bd7ac 100644 --- a/spec/services/projects/unlink_fork_service_spec.rb +++ b/spec/services/projects/unlink_fork_service_spec.rb @@ -12,9 +12,9 @@ describe Projects::UnlinkForkService, services: true do let(:mr_close_service) { MergeRequests::CloseService.new(fork_project, user) } before do - allow(MergeRequests::CloseService).to receive(:new). - with(fork_project, user). - and_return(mr_close_service) + allow(MergeRequests::CloseService).to receive(:new) + .with(fork_project, user) + .and_return(mr_close_service) end it 'close all pending merge requests' do |