diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-08-02 22:55:11 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-08-03 00:47:31 +0300 |
commit | 72a7b30c9f363063449b28aa9efc3a26a1752f9f (patch) | |
tree | 173a716da52260e57a73c4a6d739fe055898d556 /spec/workers | |
parent | e2c3dca371f8dca8814a5924fe8ed271f0ec6399 (diff) |
Change all `:empty_project` to `:project`
Diffstat (limited to 'spec/workers')
10 files changed, 19 insertions, 19 deletions
diff --git a/spec/workers/authorized_projects_worker_spec.rb b/spec/workers/authorized_projects_worker_spec.rb index bd5cc651c2b..03b9b99e263 100644 --- a/spec/workers/authorized_projects_worker_spec.rb +++ b/spec/workers/authorized_projects_worker_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe AuthorizedProjectsWorker do - let(:project) { create(:empty_project) } + let(:project) { create(:project) } describe '.bulk_perform_and_wait' do it 'schedules the ids and waits for the jobs to complete' do diff --git a/spec/workers/create_gpg_signature_worker_spec.rb b/spec/workers/create_gpg_signature_worker_spec.rb index 62ec011a3fe..c6a17d77d73 100644 --- a/spec/workers/create_gpg_signature_worker_spec.rb +++ b/spec/workers/create_gpg_signature_worker_spec.rb @@ -4,7 +4,7 @@ describe CreateGpgSignatureWorker do context 'when GpgKey is found' do it 'calls Commit#signature' do commit_sha = '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33' - project = create :empty_project + project = create :project commit = instance_double(Commit) allow(Project).to receive(:find_by).with(id: project.id).and_return(project) @@ -18,7 +18,7 @@ describe CreateGpgSignatureWorker do context 'when Commit is not found' do let(:nonexisting_commit_sha) { 'bogus' } - let(:project) { create :empty_project } + let(:project) { create :project } it 'does not raise errors' do expect { described_class.new.perform(nonexisting_commit_sha, project.id) }.not_to raise_error diff --git a/spec/workers/expire_pipeline_cache_worker_spec.rb b/spec/workers/expire_pipeline_cache_worker_spec.rb index e4f78999489..54c9a69d329 100644 --- a/spec/workers/expire_pipeline_cache_worker_spec.rb +++ b/spec/workers/expire_pipeline_cache_worker_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe ExpirePipelineCacheWorker do let(:user) { create(:user) } - let(:project) { create(:empty_project) } + let(:project) { create(:project) } let(:pipeline) { create(:ci_pipeline, project: project) } subject { described_class.new } diff --git a/spec/workers/group_destroy_worker_spec.rb b/spec/workers/group_destroy_worker_spec.rb index c78efc67076..a170c84ab12 100644 --- a/spec/workers/group_destroy_worker_spec.rb +++ b/spec/workers/group_destroy_worker_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe GroupDestroyWorker do let(:group) { create(:group) } let(:user) { create(:admin) } - let!(:project) { create(:empty_project, namespace: group) } + let!(:project) { create(:project, namespace: group) } subject { described_class.new } diff --git a/spec/workers/namespaceless_project_destroy_worker_spec.rb b/spec/workers/namespaceless_project_destroy_worker_spec.rb index f9e23d648ec..f2706254284 100644 --- a/spec/workers/namespaceless_project_destroy_worker_spec.rb +++ b/spec/workers/namespaceless_project_destroy_worker_spec.rb @@ -12,7 +12,7 @@ describe NamespacelessProjectDestroyWorker do describe '#perform' do context 'project has namespace' do it 'does not do anything' do - project = create(:empty_project) + project = create(:project) subject.perform(project.id) @@ -22,7 +22,7 @@ describe NamespacelessProjectDestroyWorker do context 'project has no namespace' do let!(:project) do - project = build(:empty_project, namespace_id: nil) + project = build(:project, namespace_id: nil) project.save(validate: false) project end @@ -54,7 +54,7 @@ describe NamespacelessProjectDestroyWorker do end context 'project forked from another' do - let!(:parent_project) { create(:empty_project) } + let!(:parent_project) { create(:project) } before do create(:forked_project_link, forked_to_project: project, forked_from_project: parent_project) diff --git a/spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb b/spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb index 1c183ce54f4..57f83c1dbe9 100644 --- a/spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb +++ b/spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb @@ -6,8 +6,8 @@ describe RemoveUnreferencedLfsObjectsWorker do describe '#perform' do let!(:unreferenced_lfs_object1) { create(:lfs_object, oid: '1') } let!(:unreferenced_lfs_object2) { create(:lfs_object, oid: '2') } - let!(:project1) { create(:empty_project, lfs_enabled: true) } - let!(:project2) { create(:empty_project, lfs_enabled: true) } + let!(:project1) { create(:project, lfs_enabled: true) } + let!(:project2) { create(:project, lfs_enabled: true) } let!(:referenced_lfs_object1) { create(:lfs_object, oid: '3') } let!(:referenced_lfs_object2) { create(:lfs_object, oid: '4') } let!(:lfs_objects_project1_1) do diff --git a/spec/workers/repository_check/batch_worker_spec.rb b/spec/workers/repository_check/batch_worker_spec.rb index bcd97a4f6ef..850b8cd8f5c 100644 --- a/spec/workers/repository_check/batch_worker_spec.rb +++ b/spec/workers/repository_check/batch_worker_spec.rb @@ -4,7 +4,7 @@ describe RepositoryCheck::BatchWorker do subject { described_class.new } it 'prefers projects that have never been checked' do - projects = create_list(:empty_project, 3, created_at: 1.week.ago) + projects = create_list(:project, 3, created_at: 1.week.ago) projects[0].update_column(:last_repository_check_at, 4.months.ago) projects[2].update_column(:last_repository_check_at, 3.months.ago) @@ -12,7 +12,7 @@ describe RepositoryCheck::BatchWorker do end it 'sorts projects by last_repository_check_at' do - projects = create_list(:empty_project, 3, created_at: 1.week.ago) + projects = create_list(:project, 3, created_at: 1.week.ago) projects[0].update_column(:last_repository_check_at, 2.months.ago) projects[1].update_column(:last_repository_check_at, 4.months.ago) projects[2].update_column(:last_repository_check_at, 3.months.ago) @@ -21,7 +21,7 @@ describe RepositoryCheck::BatchWorker do end it 'excludes projects that were checked recently' do - projects = create_list(:empty_project, 3, created_at: 1.week.ago) + projects = create_list(:project, 3, created_at: 1.week.ago) projects[0].update_column(:last_repository_check_at, 2.days.ago) projects[1].update_column(:last_repository_check_at, 2.months.ago) projects[2].update_column(:last_repository_check_at, 3.days.ago) @@ -30,7 +30,7 @@ describe RepositoryCheck::BatchWorker do end it 'does nothing when repository checks are disabled' do - create(:empty_project, created_at: 1.week.ago) + create(:project, created_at: 1.week.ago) current_settings = double('settings', repository_checks_enabled: false) expect(subject).to receive(:current_settings) { current_settings } @@ -38,7 +38,7 @@ describe RepositoryCheck::BatchWorker do end it 'skips projects created less than 24 hours ago' do - project = create(:empty_project) + project = create(:project) project.update_column(:created_at, 23.hours.ago) expect(subject.perform).to eq([]) diff --git a/spec/workers/repository_check/clear_worker_spec.rb b/spec/workers/repository_check/clear_worker_spec.rb index 3b1a64c5057..1c49415d46c 100644 --- a/spec/workers/repository_check/clear_worker_spec.rb +++ b/spec/workers/repository_check/clear_worker_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe RepositoryCheck::ClearWorker do it 'clears repository check columns' do - project = create(:empty_project) + project = create(:project) project.update_columns( last_repository_check_failed: true, last_repository_check_at: Time.now diff --git a/spec/workers/repository_import_worker_spec.rb b/spec/workers/repository_import_worker_spec.rb index 6b30dabc80e..ca904e512ac 100644 --- a/spec/workers/repository_import_worker_spec.rb +++ b/spec/workers/repository_import_worker_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe RepositoryImportWorker do - let(:project) { create(:empty_project, :import_scheduled) } + let(:project) { create(:project, :import_scheduled) } subject { described_class.new } diff --git a/spec/workers/stuck_import_jobs_worker_spec.rb b/spec/workers/stuck_import_jobs_worker_spec.rb index 466277a5e5e..2f5b685a332 100644 --- a/spec/workers/stuck_import_jobs_worker_spec.rb +++ b/spec/workers/stuck_import_jobs_worker_spec.rb @@ -9,7 +9,7 @@ describe StuckImportJobsWorker do end describe 'long running import' do - let(:project) { create(:empty_project, import_jid: '123', import_status: 'started') } + let(:project) { create(:project, import_jid: '123', import_status: 'started') } before do allow(Gitlab::SidekiqStatus).to receive(:completed_jids).and_return(['123']) @@ -21,7 +21,7 @@ describe StuckImportJobsWorker do end describe 'running import' do - let(:project) { create(:empty_project, import_jid: '123', import_status: 'started') } + let(:project) { create(:project, import_jid: '123', import_status: 'started') } before do allow(Gitlab::SidekiqStatus).to receive(:completed_jids).and_return([]) |