diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-23 01:50:15 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 18:33:05 +0300 |
commit | 1fe7501b49f896b74102c4b970310aa9ae34da85 (patch) | |
tree | ce271afb0fbaaa14291c1dc9009cd7815ee25463 /spec/services/projects | |
parent | bdbc7d967a0c3d95d5e4ea19a2a5be41268d3540 (diff) |
Revert "Prefer leading style for Style/DotPosition"
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
Diffstat (limited to 'spec/services/projects')
-rw-r--r-- | spec/services/projects/housekeeping_service_spec.rb | 12 | ||||
-rw-r--r-- | spec/services/projects/import_service_spec.rb | 18 | ||||
-rw-r--r-- | spec/services/projects/transfer_service_spec.rb | 14 | ||||
-rw-r--r-- | spec/services/projects/unlink_fork_service_spec.rb | 6 |
4 files changed, 25 insertions, 25 deletions
diff --git a/spec/services/projects/housekeeping_service_spec.rb b/spec/services/projects/housekeeping_service_spec.rb index 471ba78714b..57a5aa5cedc 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 297837537a3..ab6e8f537ba 100644 --- a/spec/services/projects/import_service_spec.rb +++ b/spec/services/projects/import_service_spec.rb @@ -73,18 +73,18 @@ describe Projects::ImportService, services: true do end it 'flushes various caches' do - expect_any_instance_of(Gitlab::Shell).to receive(:import_repository) - .with(project.repository_storage_path, project.path_with_namespace, project.import_url) - .and_return(true) + expect_any_instance_of(Gitlab::Shell).to receive(:import_repository). + with(project.repository_storage_path, project.path_with_namespace, project.import_url). + and_return(true) - expect_any_instance_of(Gitlab::GithubImport::Importer).to receive(:execute) - .and_return(true) + expect_any_instance_of(Gitlab::GithubImport::Importer).to receive(:execute). + and_return(true) - expect_any_instance_of(Repository).to receive(:expire_emptiness_caches) - .and_call_original + expect_any_instance_of(Repository).to receive(:expire_emptiness_caches). + and_call_original - expect_any_instance_of(Repository).to receive(:expire_exists_cache) - .and_call_original + expect_any_instance_of(Repository).to receive(:expire_exists_cache). + and_call_original subject.execute end diff --git a/spec/services/projects/transfer_service_spec.rb b/spec/services/projects/transfer_service_spec.rb index b6b7f94061e..5c6fbea8d0e 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 @@ -102,9 +102,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 d34652bd7ac..23f5555d3e0 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 |