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/migrations | |
parent | e2c3dca371f8dca8814a5924fe8ed271f0ec6399 (diff) |
Change all `:empty_project` to `:project`
Diffstat (limited to 'spec/migrations')
7 files changed, 21 insertions, 21 deletions
diff --git a/spec/migrations/add_head_pipeline_for_each_merge_request_spec.rb b/spec/migrations/add_head_pipeline_for_each_merge_request_spec.rb index 65bea662b02..862907c5d01 100644 --- a/spec/migrations/add_head_pipeline_for_each_merge_request_spec.rb +++ b/spec/migrations/add_head_pipeline_for_each_merge_request_spec.rb @@ -4,7 +4,7 @@ require Rails.root.join('db', 'post_migrate', '20170508170547_add_head_pipeline_ describe AddHeadPipelineForEachMergeRequest, :truncate do let(:migration) { described_class.new } - let!(:project) { create(:empty_project) } + let!(:project) { create(:project) } let!(:forked_project_link) { create(:forked_project_link, forked_from_project: project) } let!(:other_project) { forked_project_link.forked_to_project } diff --git a/spec/migrations/cleanup_namespaceless_pending_delete_projects_spec.rb b/spec/migrations/cleanup_namespaceless_pending_delete_projects_spec.rb index dd634f2c024..12cac1d033d 100644 --- a/spec/migrations/cleanup_namespaceless_pending_delete_projects_spec.rb +++ b/spec/migrations/cleanup_namespaceless_pending_delete_projects_spec.rb @@ -10,9 +10,9 @@ describe CleanupNamespacelessPendingDeleteProjects do describe '#up' do it 'only cleans up pending delete projects' do - create(:empty_project) - create(:empty_project, pending_delete: true) - project = build(:empty_project, pending_delete: true, namespace_id: nil) + create(:project) + create(:project, pending_delete: true) + project = build(:project, pending_delete: true, namespace_id: nil) project.save(validate: false) expect(NamespacelessProjectDestroyWorker).to receive(:bulk_perform_async).with([[project.id]]) @@ -21,8 +21,8 @@ describe CleanupNamespacelessPendingDeleteProjects do end it 'does nothing when no pending delete projects without namespace found' do - create(:empty_project) - create(:empty_project, pending_delete: true) + create(:project) + create(:project, pending_delete: true) expect(NamespacelessProjectDestroyWorker).not_to receive(:bulk_perform_async) diff --git a/spec/migrations/fix_wrongly_renamed_routes_spec.rb b/spec/migrations/fix_wrongly_renamed_routes_spec.rb index 148290b0e7d..5ef10b92a3a 100644 --- a/spec/migrations/fix_wrongly_renamed_routes_spec.rb +++ b/spec/migrations/fix_wrongly_renamed_routes_spec.rb @@ -37,7 +37,7 @@ describe FixWronglyRenamedRoutes, truncate: true do describe '#routes_in_namespace_query' do it 'includes only the required routes' do namespace = create(:group, path: 'hello') - project = create(:empty_project, namespace: namespace) + project = create(:project, namespace: namespace) _other_namespace = create(:group, path: 'hello0') result = Route.where(subject.routes_in_namespace_query('hello')) @@ -48,7 +48,7 @@ describe FixWronglyRenamedRoutes, truncate: true do describe '#up' do let(:broken_project) do - project = create(:empty_project, namespace: broken_namespace, path: 'broken-project') + project = create(:project, namespace: broken_namespace, path: 'broken-project') project.route.update_attribute(:path, 'api0is/broken-project') project end diff --git a/spec/migrations/migrate_old_artifacts_spec.rb b/spec/migrations/migrate_old_artifacts_spec.rb index 50f4bbda001..cfe1ca481b2 100644 --- a/spec/migrations/migrate_old_artifacts_spec.rb +++ b/spec/migrations/migrate_old_artifacts_spec.rb @@ -16,9 +16,9 @@ describe MigrateOldArtifacts do end context 'with migratable data' do - let(:project1) { create(:empty_project, ci_id: 2) } - let(:project2) { create(:empty_project, ci_id: 3) } - let(:project3) { create(:empty_project) } + let(:project1) { create(:project, ci_id: 2) } + let(:project2) { create(:project, ci_id: 3) } + let(:project3) { create(:project) } let(:pipeline1) { create(:ci_empty_pipeline, project: project1) } let(:pipeline2) { create(:ci_empty_pipeline, project: project2) } diff --git a/spec/migrations/rename_more_reserved_project_names_spec.rb b/spec/migrations/rename_more_reserved_project_names_spec.rb index 4bd8d4ac0d1..ae3a4cb9b29 100644 --- a/spec/migrations/rename_more_reserved_project_names_spec.rb +++ b/spec/migrations/rename_more_reserved_project_names_spec.rb @@ -8,7 +8,7 @@ require Rails.root.join('db', 'post_migrate', '20170313133418_rename_more_reserv # around this we use the TRUNCATE cleaning strategy. describe RenameMoreReservedProjectNames, truncate: true do let(:migration) { described_class.new } - let!(:project) { create(:empty_project) } + let!(:project) { create(:project) } before do project.path = 'artifacts' diff --git a/spec/migrations/rename_reserved_project_names_spec.rb b/spec/migrations/rename_reserved_project_names_spec.rb index 05e021c2e32..462f4c08d63 100644 --- a/spec/migrations/rename_reserved_project_names_spec.rb +++ b/spec/migrations/rename_reserved_project_names_spec.rb @@ -8,7 +8,7 @@ require Rails.root.join('db', 'post_migrate', '20161221153951_rename_reserved_pr # around this we use the TRUNCATE cleaning strategy. describe RenameReservedProjectNames, truncate: true do let(:migration) { described_class.new } - let!(:project) { create(:empty_project) } + let!(:project) { create(:project) } before do project.path = 'projects' diff --git a/spec/migrations/update_upload_paths_to_system_spec.rb b/spec/migrations/update_upload_paths_to_system_spec.rb index 7df44515424..11412005b72 100644 --- a/spec/migrations/update_upload_paths_to_system_spec.rb +++ b/spec/migrations/update_upload_paths_to_system_spec.rb @@ -11,9 +11,9 @@ describe UpdateUploadPathsToSystem do describe "#uploads_to_switch_to_new_path" do it "contains only uploads with the old path for the correct models" do _upload_for_other_type = create(:upload, model: create(:ci_pipeline), path: "uploads/ci_pipeline/avatar.jpg") - _upload_with_system_path = create(:upload, model: create(:empty_project), path: "uploads/system/project/avatar.jpg") - _upload_with_other_path = create(:upload, model: create(:empty_project), path: "thelongsecretforafileupload/avatar.jpg") - old_upload = create(:upload, model: create(:empty_project), path: "uploads/project/avatar.jpg") + _upload_with_system_path = create(:upload, model: create(:project), path: "uploads/system/project/avatar.jpg") + _upload_with_other_path = create(:upload, model: create(:project), path: "thelongsecretforafileupload/avatar.jpg") + old_upload = create(:upload, model: create(:project), path: "uploads/project/avatar.jpg") group_upload = create(:upload, model: create(:group), path: "uploads/group/avatar.jpg") expect(Upload.where(migration.uploads_to_switch_to_new_path)).to contain_exactly(old_upload, group_upload) @@ -23,9 +23,9 @@ describe UpdateUploadPathsToSystem do describe "#uploads_to_switch_to_old_path" do it "contains only uploads with the new path for the correct models" do _upload_for_other_type = create(:upload, model: create(:ci_pipeline), path: "uploads/ci_pipeline/avatar.jpg") - upload_with_system_path = create(:upload, model: create(:empty_project), path: "uploads/system/project/avatar.jpg") - _upload_with_other_path = create(:upload, model: create(:empty_project), path: "thelongsecretforafileupload/avatar.jpg") - _old_upload = create(:upload, model: create(:empty_project), path: "uploads/project/avatar.jpg") + upload_with_system_path = create(:upload, model: create(:project), path: "uploads/system/project/avatar.jpg") + _upload_with_other_path = create(:upload, model: create(:project), path: "thelongsecretforafileupload/avatar.jpg") + _old_upload = create(:upload, model: create(:project), path: "uploads/project/avatar.jpg") expect(Upload.where(migration.uploads_to_switch_to_old_path)).to contain_exactly(upload_with_system_path) end @@ -33,7 +33,7 @@ describe UpdateUploadPathsToSystem do describe "#up", truncate: true do it "updates old upload records to the new path" do - old_upload = create(:upload, model: create(:empty_project), path: "uploads/project/avatar.jpg") + old_upload = create(:upload, model: create(:project), path: "uploads/project/avatar.jpg") migration.up @@ -43,7 +43,7 @@ describe UpdateUploadPathsToSystem do describe "#down", truncate: true do it "updates the new system patsh to the old paths" do - new_upload = create(:upload, model: create(:empty_project), path: "uploads/system/project/avatar.jpg") + new_upload = create(:upload, model: create(:project), path: "uploads/system/project/avatar.jpg") migration.down |